March 5, 2024
This repo is the product of me revisiting and implementing common data structures. The figure below shows a dependency graph of the different implementations.
LinkedList
inlinked_list/linked_list.py
Stack
instack/stack.py
based on- Array
- Linked list
Queue
inqueue/queue_ds.py
based on- Array
- Linked list
PriorityQueue
inqueue/priority_queue.py
based on heapHashSet
inhash_collection/hash_set.py
based on- Array and chaining using linked lists
HashMap
inhash_collection/hash_set.py
based on- Array and chaining using linked lists
Tree
intree/tree.py
based on- Nodes connected using references
- Array (e.g. for heap)
- Collecting children of parent in linked list
BinaryTree
as subclasses of the tree implementations intree/binary_tree.py
BinarySearchTree
as subclass of the node based binary tree implementations intree/binary_search_tree.py
Heap
based on array-based implementation of binary tree inheap/heap.py