Two Pointers
Efficient list traversal and manipulation with two initialized pointers.
Fast and Slow Pointers
Detects cycles in linked lists using two pointers at different speeds.
Sliding Window
Uses a sliding window to efficiently find subsets in arrays or strings.
Merge Intervals
Efficiently merges overlapping intervals or determines their intersection.
Cyclic Sort
Sorts arrays of numbers from 1 to n in O(n) time complexity.
In-Place Linked List Reversal
Reverses the order of nodes in a linked list in-place.
Stacks
Uses a stack for efficient push, pop, and peek with O(1) time complexity.
Monotonic Stack
Utilizes a monotonic stack for efficient problem solving.
Hash Maps
Employs hash maps for constant-time lookup and insertion.
Tree Breadth First Search
Traverses trees level by level using a queue data structure.
Tree Depth First Search
Explore trees by traversing each branch as far as possible before backtracking.
Graphs
Models relationships through vertices and edges, using BFS, DFS.
Island (Matrix Traversal)
Solves problems of identifying and counting islands in a matrix.
Two Heaps
Efficiently solves problems related to scheduling and data streams with heaps.
Subsets
Generates all possible or specific subsets of a set.
Modified Binary Search
Solves problems with variations on the classic binary search algorithm.
Bitwise XOR
Uses XOR operations to find unique elements and missing/duplicate numbers.
Top K Elements
Efficiently finds the top K elements in arrays or streams.
K-way Merge
Merges K sorted arrays or lists efficiently into one sorted array or list in linear time.
Greedy Algorithms
Uses a greedy approach to find locally optimal solution for a global optimum.
0/1 Knapsack
Addresses optimization problems where items have values and weights.
Backtracking
Depth-first technique to solve problems by exploring different possibilities.
Trie
Tree-like data structure for efficient retrieval of key-value pairs or strings.
Topological Sort (graph)
Orders directed graph vertices such that u precedes v for every edge (u, v).
Union Find
Data structure tracking elements grouped into disjoint sets.
Ordered Set
Set maintaining sorted element. Useful for rank and range queries.
Multi-threaded
Uses multiple threads for concurrent tasks, enhancing system performance.