This repository contains implementations for various data structures. Each data structure has its unique applications and is implemented with consideration for complexity and memory efficiency.
- Linked List: A sequential collection of elements, where each element points to the next, allowing for efficient insertion and deletion.
- Stack: LIFO data structure with
push
andpop
operations. - Queue: FIFO data structure with
enqueue
anddequeue
operations. - Circular Queue (Ring Buffer): A circular variant of the queue that efficiently utilizes fixed-size storage.
- Priority Queue: A queue where each element has a priority, and higher priority elements are served before lower priority ones.
- Binary Tree: A tree data structure where each node has two children at most.
- Binary Search Tree (BST): A binary tree that keeps elements in sorted order, allowing for efficient search, insertion, and deletion.
- Heap: A specialized tree structure that satisfies the heap property, used in priority queues.
- Graph: Nodes connected by edges, representing various computational problems.
- Hash Table: A structure that maps keys to values with fast operations using a hash function.
- Trie (Prefix Tree): A tree-like structure for managing a set of strings, used in tasks like autocompletion.
- AVL Tree: A self-balancing binary search tree, maintaining operations in O(log n) time.
- Red-Black Tree: Another self-balancing binary search tree with good worst-case guarantees for insertion and deletion.
- B-Tree and B+ Tree: Balanced tree structures for storage systems that work efficiently with large blocks of data.
- Segment Tree: A tree for storing intervals or segments, allowing for fast queries and updates over segment ranges.
- Fenwick Tree (Binary Indexed Tree): A data structure that provides efficient methods for dynamic cumulative frequency tables.