|
| 1 | +C++ |
| 2 | +->basic syntax |
| 3 | +->STL for cp |
| 4 | + |
| 5 | +-> Pattern printing problems (improves thinking and loops) |
| 6 | +-> analysis and time complexity |
| 7 | +-> linear search basic traversal and circular array |
| 8 | +-> palindrome, armstrong, perfect,... numbers |
| 9 | +-> simple hashing problems |
| 10 | +-> prefix sum problems 1d 2d |
| 11 | +-> sliding window technique (problem) |
| 12 | + |
| 13 | +-> binary search |
| 14 | +-> gcd of two numbers in log n (euclidean and extended euc...) |
| 15 | +-> linear diphantine equation |
| 16 | +-> checking prine in sqrt(n) |
| 17 | +-> sieve of eratosthenes |
| 18 | +-> segmented sieve |
| 19 | +-> finding prime factorition of number in log n |
| 20 | +-> euler totient functions |
| 21 | +-> fermat little theorem |
| 22 | +-> wilsons theorm |
| 23 | + |
| 24 | +TOUGHER NUMBER THEORY |
| 25 | +-> find x^n in log n time |
| 26 | +-> modular airthmetic |
| 27 | +-> modular exponentiation |
| 28 | +-> chinese remainder theorm |
| 29 | +-> factorial modulo mod |
| 30 | +-> finding nCr and nPr for queries in constant time |
| 31 | +-> inclusion and exclusion principle |
| 32 | + |
| 33 | +-> sorting algoritmms |
| 34 | +-> do problems which are constructive and have swapping terms in it |
| 35 | +-> solve problems related to two-pointer method |
| 36 | +-> bit manupulation(ls,rs,set,unset,msb,lsb) |
| 37 | +-> power set of array/string using bit |
| 38 | +-> number of sub-arrays with xor as zero (problem) |
| 39 | +-> greedy algorithms |
| 40 | +-> kadane's algorithm and problems related to that |
| 41 | +-> job sequencing and activity selection problems |
| 42 | + |
| 43 | +end... number theory, bit manupulation, greedy algorithms |
| 44 | + |
| 45 | +😵RECURSION |
| 46 | +-> basic recursion problems (finding factorial) |
| 47 | +-> implement binary search |
| 48 | +-> implement modular exponentiation |
| 49 | +-> finding subsets with given sum |
| 50 | +-> merge sort and quick sort |
| 51 | +-> solve problems related to merge sort(count inversion problem) |
| 52 | +-> backtracking problems sudoku and nqueen (dp path problems) |
| 53 | + |
| 54 | + |
| 55 | +-> meet in the middle algorithm and problems |
| 56 | +-> divide and conquer (practice from codeforces only) |
| 57 | +-> next-greater/next-smaller element using stack |
| 58 | +-> problems related to paranthesis |
| 59 | +-> largest rectangular ares in histogram |
| 60 | + (concept is used in lot of problems) |
| 61 | +-> problems related to heap (priority queue)(greedy, stl) |
| 62 | + |
| 63 | + |
| 64 | + |
| 65 | +☣️🦠☠️ HARDER TOPICS (dont give up!) |
| 66 | + |
| 67 | + |
| 68 | +STRINGS: |
| 69 | +-> learn about hashing on strings and solve problems, understand when collison happens. |
| 70 | +-> rabin karp algorithm |
| 71 | +-> prefix function |
| 72 | +-> kmp algorithm |
| 73 | +-> z-function |
| 74 | +-> manachers' algorithm |
| 75 | +-> solve various problems from different platforms |
| 76 | + |
| 77 | + |
| 78 | +TREES |
| 79 | +-> tree/graph representation |
| 80 | +-> DFS/BFS traversal int graph/tree |
| 81 | +-> diameter/height/level/etc of a tree |
| 82 | +-> euler tour of tree |
| 83 | +-> finding LCA using euler tour |
| 84 | +-> finding LCA using binary lifting (log n time per query) |
| 85 | +-> distance between two nodes |
| 86 | +-> subtree problems |
| 87 | +-> solve problems (spoj recommended) |
| 88 | + |
| 89 | + |
| 90 | +GRAPHS |
| 91 | +-> connected components |
| 92 | +-> topological sort |
| 93 | +-> cycle detection in graph |
| 94 | +-> bipartite check in graph |
| 95 | +-> shortest connected component (SCC) using Kosaraju's algorithm |
| 96 | +-> Dijkstra's algorithm (shortest path) |
| 97 | +-> bellman ford algorithm (shortest path when there are negative weights) |
| 98 | +-> floyd warshl algorithm |
| 99 | +-> solve problems (hackerearth, cp-algorithms) |
| 100 | + |
| 101 | +-> bridges in a graph |
| 102 | +-> articulation point in a graph |
| 103 | +-> minimum spanning tree using Kruskal's algorithm |
| 104 | +-> Prim's algorithm |
| 105 | +-> 0/1 BFS (dijkstra takes nlog n time might give TLE. but this works in linear time) |
| 106 | +-> finding bridges online |
| 107 | +-> solve problems |
| 108 | + |
| 109 | + |
| 110 | +🤯 DYNAMIC PROGRAMMING |
| 111 | + |
| 112 | +!!!avoid iterative DP if you are a beginner in DP |
| 113 | +instead start with recursion and try to memoise the solution. |
| 114 | + |
| 115 | +-> need to be expert in recursion |
| 116 | +-> understand memoisation |
| 117 | +-> initially solve all the common existing DP problems (LCS, knapsac, etc) |
| 118 | +-> solve atcoder educational contest on DP (all 26 questions!) |
| 119 | +-> solve problems from various platforms |
| 120 | +-> understand how do we write recurrence for digit DP (cf-blog) and solve problems on it. |
| 121 | +-> DP with bitmask and solve problems |
| 122 | +-> DP on trees |
| 123 | +-> SOS DP (cf- blog) |
| 124 | + |
| 125 | + |
| 126 | +-> disjoint set(using all optimisatios) |
| 127 | +-> offline queries using disjoint set (problem: colourful array on SPOJ)(for understanding above topic) |
| 128 | +-> Kruskal's algo using disjoint set and solve bunch of problens |
| 129 | + |
| 130 | + |
| 131 | +-> sparse table (not much important. segment trees do the job) |
| 132 | +-> fenwick tree and binary lifting on fenwick tree |
| 133 | + (read about range update trick also) |
| 134 | +-> questions on fenwick tree |
| 135 | + |
| 136 | + |
| 137 | + |
| 138 | +-> Matrix exponentiation(problems) |
| 139 | +-> Sqrt decomposition technique(preferred over segment tree) |
| 140 | +-> update and query operations |
| 141 | +-> Mo's algorithm (powerful array from codeforces) |
| 142 | +-> Mo's algo on trees (long challenges mostly) |
| 143 | +-> Segment trees (most importent data structure) (Range queries and point updates) |
| 144 | +-> Lazy propagation on Segment trees (range updates) |
| 145 | + |
| 146 | + |
| 147 | +-> Spraue grundy theorm (SEEN VERY RARE) |
| 148 | +-> Flows and related problems (max flow, min flow) (cp-algorithm) |
| 149 | +-> heavy-light decomposition on trees |
| 150 | +-> Convex hull algorithm |
| 151 | +-> FFT/NTT (any maths blog) |
| 152 | + |
| 153 | + |
| 154 | + |
| 155 | + |
| 156 | + |
| 157 | + |
| 158 | + |
| 159 | + |
| 160 | + |
| 161 | + |
| 162 | + |
| 163 | + |
| 164 | + |
| 165 | + |
| 166 | + |
| 167 | + |
| 168 | + |
0 commit comments