Algorithms

  1. Data Structures
    1. Abstract Data Types
      1. Definition and Purpose
        1. Interface vs Implementation
          1. Specification Methods
            1. Examples of ADTs
              1. List ADT
                1. Stack ADT
                  1. Queue ADT
                    1. Set ADT
                      1. Map ADT
                    2. Linear Data Structures
                      1. Arrays
                        1. Static Arrays
                          1. Memory Layout
                            1. Contiguous Memory Allocation
                              1. Index-Based Access
                                1. Access Time Complexity
                                  1. Cache Performance
                                  2. Dynamic Arrays
                                    1. Resizing Strategies
                                      1. Doubling Strategy
                                        1. Incremental Growth
                                        2. Amortized Analysis
                                          1. Implementation Details
                                          2. Array Operations
                                            1. Insertion
                                              1. At Beginning
                                                1. At End
                                                  1. At Arbitrary Position
                                                  2. Deletion
                                                    1. From Beginning
                                                      1. From End
                                                        1. From Arbitrary Position
                                                        2. Traversal
                                                          1. Searching
                                                            1. Sorting
                                                            2. Multi-dimensional Arrays
                                                              1. Two-dimensional Arrays
                                                                1. Row-major vs Column-major Order
                                                                  1. Sparse Arrays
                                                                2. Linked Lists
                                                                  1. Singly Linked Lists
                                                                    1. Node Structure
                                                                      1. Memory Allocation
                                                                        1. Basic Operations
                                                                          1. Insertion at Head
                                                                            1. Insertion at Tail
                                                                              1. Insertion at Position
                                                                                1. Deletion by Value
                                                                                  1. Deletion by Position
                                                                                    1. Search
                                                                                    2. Traversal
                                                                                      1. Memory Management
                                                                                      2. Doubly Linked Lists
                                                                                        1. Node Structure
                                                                                          1. Forward and Backward Traversal
                                                                                            1. Insertion Operations
                                                                                              1. Deletion Operations
                                                                                                1. Advantages over Singly Linked Lists
                                                                                                2. Circular Linked Lists
                                                                                                  1. Singly Circular Lists
                                                                                                    1. Doubly Circular Lists
                                                                                                      1. Structure and Use Cases
                                                                                                        1. Traversal Techniques
                                                                                                          1. Termination Conditions
                                                                                                          2. Comparison with Arrays
                                                                                                            1. Time Complexity
                                                                                                              1. Space Complexity
                                                                                                                1. Cache Performance
                                                                                                              2. Stacks
                                                                                                                1. LIFO Principle
                                                                                                                  1. Core Operations
                                                                                                                    1. Push
                                                                                                                      1. Pop
                                                                                                                        1. Peek/Top
                                                                                                                          1. IsEmpty
                                                                                                                            1. Size
                                                                                                                            2. Implementation Methods
                                                                                                                              1. Array-based Implementation
                                                                                                                                1. Linked List Implementation
                                                                                                                                2. Stack Applications
                                                                                                                                  1. Expression Evaluation
                                                                                                                                    1. Infix to Postfix Conversion
                                                                                                                                      1. Postfix Evaluation
                                                                                                                                        1. Parentheses Matching
                                                                                                                                        2. Function Call Management
                                                                                                                                          1. Backtracking Algorithms
                                                                                                                                            1. Undo Operations
                                                                                                                                              1. Browser History
                                                                                                                                              2. Stack Overflow and Underflow
                                                                                                                                              3. Queues
                                                                                                                                                1. FIFO Principle
                                                                                                                                                  1. Core Operations
                                                                                                                                                    1. Enqueue
                                                                                                                                                      1. Dequeue
                                                                                                                                                        1. Front
                                                                                                                                                          1. Rear
                                                                                                                                                            1. IsEmpty
                                                                                                                                                              1. Size
                                                                                                                                                              2. Implementation Methods
                                                                                                                                                                1. Array-based Implementation
                                                                                                                                                                  1. Circular Array
                                                                                                                                                                    1. Linear Array
                                                                                                                                                                    2. Linked List Implementation
                                                                                                                                                                    3. Queue Variants
                                                                                                                                                                      1. Priority Queues
                                                                                                                                                                        1. Definition and Use Cases
                                                                                                                                                                          1. Implementation Strategies
                                                                                                                                                                            1. Unsorted Array
                                                                                                                                                                              1. Sorted Array
                                                                                                                                                                                1. Binary Heap
                                                                                                                                                                              2. Deques
                                                                                                                                                                                1. Operations
                                                                                                                                                                                  1. Insert Front
                                                                                                                                                                                    1. Insert Rear
                                                                                                                                                                                      1. Delete Front
                                                                                                                                                                                        1. Delete Rear
                                                                                                                                                                                        2. Implementation
                                                                                                                                                                                        3. Circular Queues
                                                                                                                                                                                          1. Wrap-around Logic
                                                                                                                                                                                            1. Full vs Empty Conditions
                                                                                                                                                                                      2. Non-Linear Data Structures
                                                                                                                                                                                        1. Trees
                                                                                                                                                                                          1. Basic Terminology
                                                                                                                                                                                            1. Root
                                                                                                                                                                                              1. Node
                                                                                                                                                                                                1. Leaf
                                                                                                                                                                                                  1. Internal Node
                                                                                                                                                                                                    1. Edge
                                                                                                                                                                                                      1. Path
                                                                                                                                                                                                        1. Height and Depth
                                                                                                                                                                                                          1. Level
                                                                                                                                                                                                            1. Degree
                                                                                                                                                                                                              1. Subtree
                                                                                                                                                                                                                1. Ancestor and Descendant
                                                                                                                                                                                                                  1. Sibling
                                                                                                                                                                                                                  2. Tree Properties
                                                                                                                                                                                                                    1. Number of Edges
                                                                                                                                                                                                                      1. Relationship between Nodes and Edges
                                                                                                                                                                                                                        1. Tree vs Forest
                                                                                                                                                                                                                        2. Binary Trees
                                                                                                                                                                                                                          1. Types of Binary Trees
                                                                                                                                                                                                                            1. Full Binary Tree
                                                                                                                                                                                                                              1. Complete Binary Tree
                                                                                                                                                                                                                                1. Perfect Binary Tree
                                                                                                                                                                                                                                  1. Balanced Binary Tree
                                                                                                                                                                                                                                  2. Representation
                                                                                                                                                                                                                                    1. Array Representation
                                                                                                                                                                                                                                      1. Linked Representation
                                                                                                                                                                                                                                      2. Traversal Methods
                                                                                                                                                                                                                                        1. Depth-First Traversals
                                                                                                                                                                                                                                          1. In-order Traversal
                                                                                                                                                                                                                                            1. Pre-order Traversal
                                                                                                                                                                                                                                              1. Post-order Traversal
                                                                                                                                                                                                                                              2. Breadth-First Traversal
                                                                                                                                                                                                                                                1. Level-order Traversal
                                                                                                                                                                                                                                            2. Binary Search Trees
                                                                                                                                                                                                                                              1. BST Property
                                                                                                                                                                                                                                                1. Search Operation
                                                                                                                                                                                                                                                  1. Recursive Implementation
                                                                                                                                                                                                                                                    1. Iterative Implementation
                                                                                                                                                                                                                                                    2. Insertion
                                                                                                                                                                                                                                                      1. Maintaining BST Property
                                                                                                                                                                                                                                                        1. Duplicate Handling
                                                                                                                                                                                                                                                        2. Deletion
                                                                                                                                                                                                                                                          1. Node with No Children
                                                                                                                                                                                                                                                            1. Node with One Child
                                                                                                                                                                                                                                                              1. Node with Two Children
                                                                                                                                                                                                                                                                1. Successor and Predecessor
                                                                                                                                                                                                                                                                2. Traversal Methods
                                                                                                                                                                                                                                                                  1. Performance Analysis
                                                                                                                                                                                                                                                                    1. Balancing Issues
                                                                                                                                                                                                                                                                      1. Degenerate Cases
                                                                                                                                                                                                                                                                        1. Skewed Trees
                                                                                                                                                                                                                                                                      2. Self-Balancing Trees
                                                                                                                                                                                                                                                                        1. Need for Balancing
                                                                                                                                                                                                                                                                          1. AVL Trees
                                                                                                                                                                                                                                                                            1. Balance Factor
                                                                                                                                                                                                                                                                              1. Rotations
                                                                                                                                                                                                                                                                                1. Single Right Rotation
                                                                                                                                                                                                                                                                                  1. Single Left Rotation
                                                                                                                                                                                                                                                                                    1. Left-Right Rotation
                                                                                                                                                                                                                                                                                      1. Right-Left Rotation
                                                                                                                                                                                                                                                                                      2. Insertion with Balancing
                                                                                                                                                                                                                                                                                        1. Deletion with Balancing
                                                                                                                                                                                                                                                                                          1. Height Guarantee
                                                                                                                                                                                                                                                                                          2. Red-Black Trees
                                                                                                                                                                                                                                                                                            1. Color Rules
                                                                                                                                                                                                                                                                                              1. Insertion Algorithm
                                                                                                                                                                                                                                                                                                1. Color Flipping
                                                                                                                                                                                                                                                                                                  1. Rotations
                                                                                                                                                                                                                                                                                                  2. Deletion Algorithm
                                                                                                                                                                                                                                                                                                    1. Comparison with AVL Trees
                                                                                                                                                                                                                                                                                                    2. Splay Trees
                                                                                                                                                                                                                                                                                                      1. Splaying Operation
                                                                                                                                                                                                                                                                                                        1. Access Patterns
                                                                                                                                                                                                                                                                                                          1. Amortized Analysis
                                                                                                                                                                                                                                                                                                        2. B-Trees
                                                                                                                                                                                                                                                                                                          1. Definition and Properties
                                                                                                                                                                                                                                                                                                            1. Order and Degree
                                                                                                                                                                                                                                                                                                              1. Node Structure
                                                                                                                                                                                                                                                                                                                1. Search Operation
                                                                                                                                                                                                                                                                                                                  1. Insertion
                                                                                                                                                                                                                                                                                                                    1. Node Splitting
                                                                                                                                                                                                                                                                                                                      1. Propagation
                                                                                                                                                                                                                                                                                                                      2. Deletion
                                                                                                                                                                                                                                                                                                                        1. Borrowing
                                                                                                                                                                                                                                                                                                                          1. Merging
                                                                                                                                                                                                                                                                                                                          2. Applications in Databases
                                                                                                                                                                                                                                                                                                                            1. B+ Trees
                                                                                                                                                                                                                                                                                                                              1. Differences from B-Trees
                                                                                                                                                                                                                                                                                                                                1. Leaf Node Linking
                                                                                                                                                                                                                                                                                                                            2. Heaps
                                                                                                                                                                                                                                                                                                                              1. Heap Property
                                                                                                                                                                                                                                                                                                                                1. Binary Heaps
                                                                                                                                                                                                                                                                                                                                  1. Min-Heap Property
                                                                                                                                                                                                                                                                                                                                    1. Max-Heap Property
                                                                                                                                                                                                                                                                                                                                      1. Complete Binary Tree Structure
                                                                                                                                                                                                                                                                                                                                        1. Array Representation
                                                                                                                                                                                                                                                                                                                                          1. Parent-Child Relationships
                                                                                                                                                                                                                                                                                                                                            1. Index Calculations
                                                                                                                                                                                                                                                                                                                                          2. Heap Operations
                                                                                                                                                                                                                                                                                                                                            1. Insert
                                                                                                                                                                                                                                                                                                                                              1. Bubble-Up Process
                                                                                                                                                                                                                                                                                                                                                1. Time Complexity
                                                                                                                                                                                                                                                                                                                                                2. Extract-Min/Extract-Max
                                                                                                                                                                                                                                                                                                                                                  1. Root Removal
                                                                                                                                                                                                                                                                                                                                                    1. Bubble-Down Process
                                                                                                                                                                                                                                                                                                                                                      1. Time Complexity
                                                                                                                                                                                                                                                                                                                                                      2. Heapify
                                                                                                                                                                                                                                                                                                                                                        1. Bottom-Up Heapification
                                                                                                                                                                                                                                                                                                                                                          1. Top-Down Heapification
                                                                                                                                                                                                                                                                                                                                                          2. Build-Heap
                                                                                                                                                                                                                                                                                                                                                            1. Linear Time Construction
                                                                                                                                                                                                                                                                                                                                                            2. Decrease-Key/Increase-Key
                                                                                                                                                                                                                                                                                                                                                            3. Heap Applications
                                                                                                                                                                                                                                                                                                                                                              1. Priority Queues
                                                                                                                                                                                                                                                                                                                                                                1. Heapsort Algorithm
                                                                                                                                                                                                                                                                                                                                                                  1. Graph Algorithms
                                                                                                                                                                                                                                                                                                                                                                  2. Heap Variants
                                                                                                                                                                                                                                                                                                                                                                    1. d-ary Heaps
                                                                                                                                                                                                                                                                                                                                                                      1. Binomial Heaps
                                                                                                                                                                                                                                                                                                                                                                        1. Fibonacci Heaps
                                                                                                                                                                                                                                                                                                                                                                      2. Hash Tables
                                                                                                                                                                                                                                                                                                                                                                        1. Hashing Concepts
                                                                                                                                                                                                                                                                                                                                                                          1. Hash Functions
                                                                                                                                                                                                                                                                                                                                                                            1. Properties of Good Hash Functions
                                                                                                                                                                                                                                                                                                                                                                              1. Uniform Distribution
                                                                                                                                                                                                                                                                                                                                                                                1. Deterministic
                                                                                                                                                                                                                                                                                                                                                                                  1. Efficient Computation
                                                                                                                                                                                                                                                                                                                                                                                  2. Common Hash Functions
                                                                                                                                                                                                                                                                                                                                                                                    1. Division Method
                                                                                                                                                                                                                                                                                                                                                                                      1. Multiplication Method
                                                                                                                                                                                                                                                                                                                                                                                        1. Universal Hashing
                                                                                                                                                                                                                                                                                                                                                                                          1. Cryptographic Hash Functions
                                                                                                                                                                                                                                                                                                                                                                                        2. Hash Table Structure
                                                                                                                                                                                                                                                                                                                                                                                          1. Direct Addressing
                                                                                                                                                                                                                                                                                                                                                                                          2. Collision Resolution Strategies
                                                                                                                                                                                                                                                                                                                                                                                            1. Chaining
                                                                                                                                                                                                                                                                                                                                                                                              1. Linked List Implementation
                                                                                                                                                                                                                                                                                                                                                                                                1. Dynamic Arrays
                                                                                                                                                                                                                                                                                                                                                                                                  1. Load Factor Analysis
                                                                                                                                                                                                                                                                                                                                                                                                    1. Performance Analysis
                                                                                                                                                                                                                                                                                                                                                                                                    2. Open Addressing
                                                                                                                                                                                                                                                                                                                                                                                                      1. Linear Probing
                                                                                                                                                                                                                                                                                                                                                                                                        1. Primary Clustering
                                                                                                                                                                                                                                                                                                                                                                                                          1. Performance Analysis
                                                                                                                                                                                                                                                                                                                                                                                                          2. Quadratic Probing
                                                                                                                                                                                                                                                                                                                                                                                                            1. Secondary Clustering
                                                                                                                                                                                                                                                                                                                                                                                                              1. Probe Sequence
                                                                                                                                                                                                                                                                                                                                                                                                              2. Double Hashing
                                                                                                                                                                                                                                                                                                                                                                                                                1. Secondary Hash Function
                                                                                                                                                                                                                                                                                                                                                                                                                  1. Probe Sequence
                                                                                                                                                                                                                                                                                                                                                                                                                  2. Deletion in Open Addressing
                                                                                                                                                                                                                                                                                                                                                                                                                    1. Tombstone Approach
                                                                                                                                                                                                                                                                                                                                                                                                                      1. Rehashing Approach
                                                                                                                                                                                                                                                                                                                                                                                                                  3. Load Factor and Performance
                                                                                                                                                                                                                                                                                                                                                                                                                    1. Load Factor Definition
                                                                                                                                                                                                                                                                                                                                                                                                                      1. Performance Impact
                                                                                                                                                                                                                                                                                                                                                                                                                        1. Rehashing
                                                                                                                                                                                                                                                                                                                                                                                                                          1. When to Rehash
                                                                                                                                                                                                                                                                                                                                                                                                                            1. Rehashing Process
                                                                                                                                                                                                                                                                                                                                                                                                                              1. Amortized Analysis
                                                                                                                                                                                                                                                                                                                                                                                                                            2. Applications of Hash Tables
                                                                                                                                                                                                                                                                                                                                                                                                                              1. Symbol Tables
                                                                                                                                                                                                                                                                                                                                                                                                                                1. Caching
                                                                                                                                                                                                                                                                                                                                                                                                                                  1. Database Indexing
                                                                                                                                                                                                                                                                                                                                                                                                                                    1. Cryptography
                                                                                                                                                                                                                                                                                                                                                                                                                                  2. Graphs
                                                                                                                                                                                                                                                                                                                                                                                                                                    1. Graph Terminology
                                                                                                                                                                                                                                                                                                                                                                                                                                      1. Vertex/Node
                                                                                                                                                                                                                                                                                                                                                                                                                                        1. Edge/Arc
                                                                                                                                                                                                                                                                                                                                                                                                                                          1. Adjacent Vertices
                                                                                                                                                                                                                                                                                                                                                                                                                                            1. Incident Edges
                                                                                                                                                                                                                                                                                                                                                                                                                                              1. Path
                                                                                                                                                                                                                                                                                                                                                                                                                                                1. Simple Path
                                                                                                                                                                                                                                                                                                                                                                                                                                                  1. Cycle
                                                                                                                                                                                                                                                                                                                                                                                                                                                    1. Simple Cycle
                                                                                                                                                                                                                                                                                                                                                                                                                                                      1. Degree
                                                                                                                                                                                                                                                                                                                                                                                                                                                        1. In-degree
                                                                                                                                                                                                                                                                                                                                                                                                                                                          1. Out-degree
                                                                                                                                                                                                                                                                                                                                                                                                                                                          2. Connected Components
                                                                                                                                                                                                                                                                                                                                                                                                                                                            1. Strongly Connected Components
                                                                                                                                                                                                                                                                                                                                                                                                                                                            2. Graph Types
                                                                                                                                                                                                                                                                                                                                                                                                                                                              1. Directed vs Undirected Graphs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                1. Definitions
                                                                                                                                                                                                                                                                                                                                                                                                                                                                  1. Use Cases
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    1. Conversion Between Types
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    2. Weighted vs Unweighted Graphs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      1. Edge Weights
                                                                                                                                                                                                                                                                                                                                                                                                                                                                      2. Simple vs Multigraphs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        1. Complete Graphs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                          1. Bipartite Graphs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                            1. Trees as Graphs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              1. DAGs
                                                                                                                                                                                                                                                                                                                                                                                                                                                                              2. Graph Representations
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                1. Adjacency Matrix
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  1. Structure
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    1. Space Complexity
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      1. Time Complexity for Operations
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        1. Advantages and Disadvantages
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        2. Adjacency List
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          1. Structure
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            1. Space Complexity
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              1. Time Complexity for Operations
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                1. Advantages and Disadvantages
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                2. Edge List
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  1. Structure
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    1. Use Cases
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    2. Incidence Matrix
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      1. Structure
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      2. Comparison of Representations