Problem Count | Topic | Level | Problem | Solution | Notes | Time | R - 1 | R - 2 | R - 3 |
---|---|---|---|---|---|---|---|---|---|
Linked List |
|||||||||
1 | - | Easy | LeetCode | Reverse Linked List | updating notes... | ❌ | |||
2 | - | Medium | LeetCode | Add two numbers | updating notes... | ❌ | |||
3 | - | Medium | LeetCode | Remove Nth Node From End of List | updating notes... | ❌ |
- Nodes
- Linked List
- Singly Linked List + All Operations
- Doubly Linked List + All Operations
- Circular Linked List
- Circular Singly Linked List
- Circular Doubly Linked List
- Array & List
- Stack
- Array-based implementation
- LinkedList-based implementation
- Queue
- Array-based implementation
- Linked list-based implementation
- Circular queue
- Priority queue
- Deque (double-ended queue)
- Hash Tables
- HashMap
- HashSet
- Collision resolution techniques (chaining, open addressing)
-
Tree (Data Structures)
- Tree Implementation
- Binary Trees
- Full binary tree
- Complete binary tree
- Perfect binary tree
- Binary Search Trees (BST)
- Balanced BST (e.g., AVL tree, Red-Black tree)
- Splay tree
- Treap
- Heaps
- Min-heap
- Max-heap
- Binary heap
- Fibonacci heap
- Binomial heap
- Tries (Prefix Trees)
- Standard trie
- Compressed trie (Radix tree)
- Suffix trie
- Segment Trees
- Standard segment tree
- Lazy propagation
- Fenwick Trees (Binary Indexed Trees)
- Standard Fenwick tree
- B-Trees
- B-tree
- B+ tree
- B* tree
- Quad Trees
- Standard quad tree
- K-D Trees
- Standard K-D tree
- Inorder
- Recursive
- Iterative
- Preorder
- Recursive
- Iterative
- PostOrder
- Recursive
- Iterative
-
Graph Data Structures
- Graphs
- Adjacency matrix
- Adjacency list
- Edge list
- Specialized Graphs
- Directed graph (digraph)
- Weighted graph
- Undirected graph
- Directed Acyclic Graph (DAG)
- Graphs
Advanced Data Structures
- Disjoint Set (Union-Find)
- Quick-find
- Quick-union
- Union by rank
- Path compression
- Bloom Filters
- Standard Bloom filter
- Counting Bloom filter
- Skip Lists
- Standard skip list
- Suffix Arrays
- Standard suffix array
- Sparse Tables
- Standard sparse table
Specialized Data Structures
- Trie Variants
- Patricia trie
- Suffix tree
- Spatial Data Structures
- R-tree
- R*-tree
- k-d tree
- Quad tree
- Multidimensional Data Structures
- Range tree
- Interval tree
- Persistent Data Structures
- Persistent array
- Persistent list
- Persistent tree
- Sorting
- Binary
- Selection
- Insertion
- Quick
- Merge
- Counting
- Radix
- Bucket
- Heap
- Search
- Binary Search
- Lower Bound
- Upper Bound
- Binary Search on Ranges
- String
- Rabin Karp
Pattern 1: Given input is a sorted (array, list or matrix)
Use a variation of:
1. Binary Search or
2. Two Pointer strategy
Pattern 2: If asked minimum/maximum/top/closest'k' elements among 'n' elements
Use:
1. Heap
Pattern 3: If required to try all Permutations or Combinations of a input
Use either:
1. Recursive _ Backtracking or
2. Iterative _ Breadth-First Search
Pattern 4: If required to solve Trees or Graph problems
Use either:
1. Breadth-First Search or
2. Depth-First Search
Pattern 5: If given a Set of Strings among that we have to find some Common Substring
Use either:
1. HashMap or
2. Trie
Hack 1: Try to convert Recursive Solution to Iterative Solution
Use Stack
Hack 2: If given problem have a Brute-Force solution in O(n^2)Time and O(1)Space, Try to find out for other Two Solutions
Use either:
1. Map or Set for O(n)Time and O(n)Space
2. Sorting for O(n log n)Time and O(1)Space
Hack 3: If given problem is to Optimize something, (say Maximization or Minimization)
Use:
1. Dynamic Programming
Hack 4: If given Bunch of Strings and asked to search something
Use either:
1. HashMap or
2. Trie
Hack 5: If given problem is LinkedList one, and ExtraSpace is not allowed
Use:
1. Fast & Slow Pointer approach
- Two Pointers
- Fast and Slow Pointers
- In-place reversal of Linked List
- Sliding Window
- Island Matrix Traversal
- Merge Intervals
- Cyclic Sort
- Tree: Breadth First Search
- Tree: Depth First Search
- Two Heaps
- Subsets
- Modified Binary Search
- Bitwise XOR
- Top K Element
- K-way merge
- Backtracking
- 0-1 Knapsack (DP)
- Topological Sort (Graph)
- Multi-threaded
- Knapsack
- Unbounded Knapsack
- Fibonacci Numbers
- Palindromic Subsequence
- Longest Common Substring
Reference : List of Questions asked on System Design
- Practice and Study consistently. No Streak breaks
- Create Flashcards daily.
- Spend 1-2 hour synthesizing whatever you learn.
- List down all the aha moments in one file.
- Practice Java / Create Projects in JAVA
- Reserve time for writing notes and practicing flashcards
$ poetry install
$ poetry run pytest --benchmark-skip
If you don't use poetry, there is also a classic requirements.txt
file. to be updated...
If you find any bug or incorrect implementation in this repo, please let me know by opening an issue or pull request. Data community would appreciate your help since they provide some random strings which are used in two of test cases.