Basic Data Structures
Master the fundamental data structures that form the building blocks of most algorithms.
Arrays & Dynamic Arrays
- Static Arrays: Fixed-size contiguous memory blocks
- Dynamic Arrays: Resizable arrays with amortized O(1) insertion
- Operations: Access O(1), Search O(n), Insertion O(n), Deletion O(n)
Linked Lists (Singly, Doubly, Circular)
- Singly Linked List: Each node points to the next
- Doubly Linked List: Each node points to both next and previous
- Circular Linked List: Last node points back to first
- Operations: Access O(n), Search O(n), Insertion O(1), Deletion O(1)
Stacks & Queues
- Stack: LIFO (Last In, First Out) - push, pop, peek
- Queue: FIFO (First In, First Out) - enqueue, dequeue, front
- Operations: All O(1) for basic operations
Hash Tables & Hash Maps
- Hash Table: Key-value storage with average O(1) access
- Hash Map: Implementation of hash table with collision handling
- Collision Resolution: Chaining, open addressing, linear probing
Sets & Multisets
- Set: Collection of unique elements
- Multiset: Collection allowing duplicate elements
- Operations: Insert, delete, search typically O(1) average case