Beginner DSA
- 1st Visit
- 0/140
- 2nd Visit
- 0/140
- Revise
- 0/140
01Arrays & Hashing
0/15
Arrays store elements contiguously, giving O(1) access by index; hash maps and hash sets add O(1) average time lookup by value. Together they turn many brute force…
Pattern guide02Two Pointers
0/12
Two pointers keeps two indices that move through a sequence according to a rule, so that every step discards candidates that cannot be optimal. The common forms are…
Pattern guide03Strings
0/13
String problems are array problems over characters, with a few recurring tools: frequency tables of size 26 or 256, comparing characters from both ends, building output…
Pattern guide04Matrix (2-D Arrays)
0/10
A matrix is a 2 D array indexed by row and column; visiting all m n cells costs O(m n). Most problems combine a few moves: scanning rows or columns, walking the…
Pattern guide| # | Problem | Platform | Difficulty | Open | 1st1st Visit | 2nd2nd Visit | RevRevise |
|---|---|---|---|---|---|---|---|
| 1 | Matrix Diagonal Sum | LeetCode | Easy | Solve Matrix Diagonal Sum on LeetCode (opens in a new tab) | |||
| 2 | Beautiful Matrix | Codeforces | Easy 800 | Solve Beautiful Matrix on Codeforces (opens in a new tab) | |||
| 3 | Transpose Matrix | LeetCode | Easy | Solve Transpose Matrix on LeetCode (opens in a new tab) | |||
| 4 | Target Practice | Codeforces | Easy 800 | Solve Target Practice on Codeforces (opens in a new tab) | |||
| 5 | Pascal's Triangle | LeetCode | Easy | Solve Pascal's Triangle on LeetCode (opens in a new tab) | |||
| 6 | Lights Out | Codeforces | Easy 900 | Solve Lights Out on Codeforces (opens in a new tab) | |||
| 7 | Set Matrix Zeroes | LeetCode | Medium | Solve Set Matrix Zeroes on LeetCode (opens in a new tab) | |||
| 8 | Valid Sudoku | LeetCode | Medium | Solve Valid Sudoku on LeetCode (opens in a new tab) | |||
| 9 | Rotate Image | LeetCode | Medium | Solve Rotate Image on LeetCode (opens in a new tab) | |||
| 10 | Spiral Matrix | LeetCode | Medium | Solve Spiral Matrix on LeetCode (opens in a new tab) |
05Prefix Sum
0/11
A prefix sum array stores pre[i], the total of the first i elements, so any subarray sum a[l..r] equals pre[r + 1] pre[l] in O(1) after O(n) preprocessing. The same…
Pattern guide06Binary Search
0/12
Binary search halves a sorted search space at every step, finding a target or a boundary in O(log n). The most useful form is boundary search: find the first index…
Pattern guide07Recursion
0/11
A recursive function solves a problem by calling itself on smaller instances until it reaches a base case that is answered directly. Writing one comes down to three…
Pattern guide08Linked List
0/14
A singly linked list stores nodes that point to their successor, so insertion and deletion are O(1) once you hold the right node, but reaching the k th node takes O(k)…
Pattern guide09Stack & Queue
0/12
A stack is last in, first out: the most recent unfinished item is always on top, which makes it the natural tool for matching brackets, evaluating expressions, undoing…
Pattern guide10Math & Implementation
0/16
Implementation problems test whether you can translate a precise statement into correct code: simulate the process, handle every edge case, and choose types that do not…
Pattern guide11Mixed Practice
All patterns0/14
This set closes the Beginner level with fourteen problems drawn from all of its patterns: arrays and hashing, two pointers, strings, matrices, prefix sums, binary…
Pattern guide