Common
A collection of generic C# data structures, including an iterative binary search trees, an AVL tree, a red-black tree, a skip-list, and a min/max heap..
Install / Use
/learn @ArsenShnurkov/CommonREADME
Common
This library contains some commonly used data structures. I mainly wrote them for the educational challenge, but I believe they've evolved to the point where they could be quite useful over a wide variety of applications.
- BinarySearchTree is an unabalanced BST that uses iterative algorithms in order to avoid stack overflows.
- RedBlackTree is a self-balancing BST that has faster inserts and deletes than the AVLTree, but slower lookup speeds. RedBlackTree uses recursive algorithms.
- AVLTree is a self-balancing BST that has slower inserts than the RedBlackTree but faster lookup speeds. This tree is also recursive.
- Skip List achiieves approximately the same performance as a Red-Black or AVL tree but it's implementation is much more simple and easy to understand.
- Heap can be constructed as either a min or a max heap.
The insert, delete, and find timings are for an older itereation of the code but can still be used to see an approximate comparison of the efficiency of each operation. The timings included for the BinarySearchTreeBase can be ignored. This used to be a base class shared between the AVL and RedBlackTrees and has been removed in order to increase their efficiency.
This solution includes 574 unit tests that cover all of the important functionality in the library.
Related Skills
node-connect
337.3kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
83.2kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
337.3kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
83.2kCommit, push, and open a PR
Security Score
Audited on Dec 10, 2024
