└── README.md /README.md: -------------------------------------------------------------------------------- 1 | # Get_Better_CP_in_2_Months 2 | 3 | Join us on X community: https://x.com/i/communities/1873085009294410088 4 | 5 | # Month 1 6 | 7 |
8 | Week 1 9 | 10 | Dynamic Programming 11 | 12 | - [ ] Read [Dynamic Programming Notes Hackerearth](https://www.hackerearth.com/practice/notes/dynamic-programming-i-1/) 13 | - [ ] Read [DP Tutorial involving grids](https://www.hackerearth.com/practice/notes/dynamic-programming-problems-involving-grids/) 14 | - [ ] Read [TopCoder Tutorial on DP](https://www.topcoder.com/community/competitive-programming/tutorials/dynamic-programming-from-novice-to-advanced/) 15 | - Solve the following classical problems: 16 | - [ ] [Coin change problem](https://www.hackerrank.com/challenges/coin-change/problem) 17 | - [ ] [Unbounded Knapsack](https://www.hackerrank.com/challenges/unbounded-knapsack/problem) 18 | - [ ] [Longest common subsequence](https://www.hackerrank.com/challenges/dynamic-programming-classics-the-longest-common-subsequence/problem) 19 | - Solve the following MISC problems: 20 | - [ ] [Cutting](https://codeforces.com/problemset/problem/998/B) 21 | - [ ] [The Great Julya Calendar](https://codeforces.com/problemset/problem/331/C1) 22 | - [ ] [Shashlik Cooking](https://codeforces.com/problemset/problem/1040/B) 23 | - [ ] [Divisibility by Eight](https://codeforces.com/problemset/problem/550/C) 24 | - [ ] [Bishwock](https://codeforces.com/problemset/problem/991/D) 25 | - [ ] [Functions again](https://codeforces.com/problemset/problem/788/A) 26 | - [ ] [An impassioned circulation of affection](https://codeforces.com/problemset/problem/814/C) 27 | - [ ] [Color Stripe](https://codeforces.com/problemset/problem/219/C) 28 | - [ ] [Prime XOR](https://www.hackerrank.com/challenges/prime-xor/problem) 29 | - [ ] [HackerRank City](https://www.hackerrank.com/challenges/hr-city/problem) 30 | 31 | ### Contests 32 | - [ ] [Educational DP contest on AtCoder](https://atcoder.jp/contests/dp) 33 | - [ ] [DSA Learning Series: Week 7 - DP By CodeChef](https://www.codechef.com/LRNDSA07) 34 | - [ ] [Marathon DP - 01](https://vjudge.net/contest/202878) 35 | - [ ] [V Planet DP - 2](https://codeforces.com/group/hK6hgc8x94/contest/222255) 36 | - [ ] [V Planet DP - 3](https://codeforces.com/group/hK6hgc8x94/contest/222261) 37 | - [ ] [V Planet DP Week 5](https://codeforces.com/group/hK6hgc8x94/contest/238061) 38 | 39 |
40 | 41 | *** 42 | 43 |
44 | Week 2 45 | 46 | Trees & Graphs 47 | 48 | ### Trees 49 | 50 | | ☆ | Problem Link | Finished | 51 | |-----|----------------------------------------------------------------------------------------------------------|---------------------------| 52 | | ★☆☆ | [Diameter of a Binary Tree](https://leetcode.com/problems/diameter-of-binary-tree/) | | 53 | | ★☆☆ | [Path Sum](https://leetcode.com/problems/path-sum/) | | 54 | | ★★☆ | [K-th smallest element in a BST](https://leetcode.com/problems/kth-smallest-element-in-a-bst/) | | 55 | | ★★☆ | [Find duplicate subtrees](https://leetcode.com/problems/find-duplicate-subtrees/) | | 56 | | ★★☆ | [Lowest Common Ancestor of a binary tree](https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-tree/) | | 57 | | ★★★ | [Sum of distances in tree](https://leetcode.com/problems/sum-of-distances-in-tree/) | | 58 | 59 | ### Graphs 60 | 61 | #### BFS and DFS 62 | 63 | - [ ] [Ones and Zeroes](https://www.spoj.com/problems/ONEZERO/) 64 | - [ ] [Prime Path](https://www.spoj.com/problems/PPATH/) 65 | 66 | #### Strongly Connected Components 67 | 68 | - [ ] [The Bottom of a Graph](https://www.spoj.com/problems/BOTTOM/) 69 | - [ ] [Fake Tournament](https://www.spoj.com/problems/TOUR/) 70 | 71 | ### Biconnected Components, Shortest Path and MST 72 | 73 | #### Reading Material 74 | 75 | - [ ] [:movie_camera:](https://www.youtube.com/watch?v=aZXi1unBdJA)[Finding Bridges in Graphs](https://cp-algorithms.com/graph/bridge-searching.html) 76 | - [ ] [:movie_camera:](https://www.youtube.com/watch?v=aZXi1unBdJA)[Articulation Points](https://github.com/williamfiset/Algorithms/blob/master/slides/graphtheory/bridges_and_articulation_points.pdf) 77 | - [ ] [:movie_camera:](https://www.youtube.com/watch?v=pSqmAO-m7Lk)[Dijkstra's Shortest path](https://cp-algorithms.com/graph/dijkstra_sparse.html) 78 | - [ ] [Bellman Ford algorithm](https://cp-algorithms.com/graph/bellman_ford.html) 79 | - [ ] [:movie_camera:](https://www.youtube.com/watch?v=4NQ3HnhyNfQ)[Floyd Warshall's algorithm](https://cp-algorithms.com/graph/all-pair-shortest-path-floyd-warshall.html) 80 | - [ ] [:movie_camera:](https://www.youtube.com/watch?v=JZBQLXgSGfs)[Kruska's Minimum Spanning Tree](https://cp-algorithms.com/graph/mst_kruskal.html) 81 | - [ ] [:movie_camera:](https://www.youtube.com/watch?v=jsmMtJpPnhU)[Prim's MST Algorithm](https://cp-algorithms.com/graph/mst_prim.html) 82 | 83 | #### Problems: Biconnected Components 84 | - [ ] [UVa 00315: Network](https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=670&page=show_problem&problem=251) (finding articulation points) 85 | - [ ] [UVa 00796: Critical Links](https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=670&page=show_problem&problem=737) (finding bridges) 86 | - [ ] [CF 193A: Cutting Figure](http://codeforces.com/problemset/problem/193/A) 87 | 88 | #### Problems: Shortest Path 89 | - [ ] [HE: Minimum Valid Path](https://www.hackerearth.com/practice/algorithms/graphs/graph-representation/practice-problems/algorithm/minimum-valid-path-3dc5bd03/) 90 | - [ ] [CC: DIGJUMP](https://www.codechef.com/problems/DIGJUMP) 91 | - [ ] [CC: AMR14B](https://www.codechef.com/AMR14ROS/problems/AMR14B) 92 | - [ ] [SPOJ: Mice and Maze](https://www.spoj.com/problems/MICEMAZE/) 93 | 94 | #### Problems: Minimum Spanning Tree 95 | - [ ] [SPOJ: BLINNET](https://www.spoj.com/problems/BLINNET/) 96 | - [ ] [HR: Roads in HackerLand](https://www.hackerrank.com/contests/june-world-codesprint/challenges/johnland/problem) 97 | - [ ] [CC: MST Queries](https://www.codechef.com/problems/MSTQS) 98 | - [ ] [SPOJ: KOICOST](https://www.spoj.com/problems/KOICOST/) 99 | 100 | ### Contests 101 | 102 | - [ ] [DSA Learning Series: Week 8 - Graphs By CodeChef](https://www.codechef.com/LRNDSA08) 103 | *** 104 | 105 |
106 | 107 | *** 108 | 109 |
110 | Week 3 111 | 112 | String Algorithms 113 | 114 | 1. #### Reading material 115 | - [ ] [Basics of String manipulation](https://www.hackerearth.com/practice/algorithms/string-algorithm/basics-of-string-manipulation/tutorial/) 116 | - [ ] [KMP algorithm](https://www.hackerearth.com/practice/algorithms/string-algorithm/string-searching/tutorial/) 117 | - [ ] [Z algorithm](https://www.hackerearth.com/practice/algorithms/string-algorithm/z-algorithm/tutorial/) 118 | - [ ] [Z algorithm II](https://cp-algorithms.com/string/z-function.html) 119 | - [ ] [Manachar's algorithm](https://www.hackerearth.com/practice/algorithms/string-algorithm/manachars-algorithm/tutorial/) 120 | - [ ] [Manacher's algorithm II](https://cp-algorithms.com/string/manacher.html) 121 | - [ ] [Rabin-Karp and KMP TopCoder](https://www.topcoder.com/community/competitive-programming/tutorials/introduction-to-string-searching-algorithms/) 122 | 123 | 2. #### Problems on HackerEarth 124 | | ☆ | Problem Link | Finished | 125 | |-----|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------| 126 | | ★★☆ | [Find the substrings](https://www.hackerearth.com/practice/algorithms/string-algorithm/basics-of-string-manipulation/practice-problems/algorithm/find-the-substrings/) | | 127 | | ★★☆ | [The Cheapest Palindrome](https://www.hackerearth.com/practice/algorithms/string-algorithm/basics-of-string-manipulation/practice-problems/algorithm/make-the-cheapest-palindrome-1/) | | 128 | | ★★☆ | [Largest Lexicographical Rotation II](https://www.hackerearth.com/practice/algorithms/string-algorithm/string-searching/practice-problems/algorithm/largest-lexicographical-rotation-ii/) | | 129 | | ★★☆ | [Monk and Monster](https://www.hackerearth.com/practice/algorithms/string-algorithm/string-searching/practice-problems/algorithm/monk-and-monster-1acbb78c/) | | 130 | | ★★★ | [Prefix Number](https://www.hackerearth.com/practice/algorithms/string-algorithm/z-algorithm/practice-problems/algorithm/prefix-number-f5c76976/) | | 131 | | ★★★ | [Last Forever](https://www.hackerearth.com/practice/algorithms/string-algorithm/manachars-algorithm/practice-problems/algorithm/last-forever/) | | 132 | 133 | 3. #### Problems on HackerRank 134 | | ☆ | Problem Link | Finished | 135 | |-----|----------------------------------------------------------------------------------------------------------|---------------------------| 136 | | ★☆☆ | [Sherlock and the Valid String](https://www.hackerrank.com/challenges/sherlock-and-valid-string/problem) | | 137 | | ★☆☆ | [Highest Value Palindrome](https://www.hackerrank.com/challenges/richie-rich/problem) | | 138 | | ★★☆ | [Sherlock and Anagrams](https://www.hackerrank.com/challenges/sherlock-and-anagrams/problem) | | 139 | | ★★☆ | [Common Child](https://www.hackerrank.com/challenges/common-child/problem) | | 140 | | ★★★ | [Build a Palindrome](https://www.hackerrank.com/challenges/challenging-palindromes/problem) | | 141 | 142 | 4. ### Problems on Codeforces 143 | 144 | | ☆ | Problem Link | Finished | 145 | |-----|----------------------------------------------------------------------------------------------------------|---------------------------| 146 | | ★☆☆ | [Petya and Exam](https://codeforces.com/problemset/problem/832/B) | | 147 | | ★★☆ | [Password](https://codeforces.com/problemset/problem/126/B) | | 148 | | ★★★ | [Prefixes and Suffixes](https://codeforces.com/problemset/problem/432/D) | | 149 | 150 | 5. ### Problems on Codechef 151 | - [ ] [Kira Loves Palindromes](https://www.codechef.com/APRIL19A/problems/KLPM/) 152 | 6. ### Problems on SPOJ 153 | - [ ] [Word Puzzles](https://www.spoj.com/problems/WPUZZLES/) 154 | 155 |
156 | 157 | *** 158 | 159 |
160 | Week 4 161 | 162 | ## Week 4: Practice Contest 163 | 164 | - [ ] [ZCO Practice Contest](https://www.codechef.com/ZCOPRAC) 165 | - [ ] [INOI Problems](https://www.codechef.com/INOIPRAC) 166 | - [ ] [IARCS OPC Judge Problems](https://www.codechef.com/IARCSJUD) 167 | 168 |
169 | 170 | *** 171 | 172 | # Month 2 173 | 174 |
175 | Week 5 176 | 177 | Data Structures 178 | 179 | ### Sparse Table 180 | 181 | 1. #### Reading Material 182 | - [ ] [:movie_camera:](https://www.youtube.com/watch?v=uUatD9AudXo)[Tutorial](https://cp-algorithms.com/data_structures/sparse-table.html) 183 | - [ ] [Blog post](http://adilet.org/blog/sparse-table/) 184 | 185 | 2. #### Problems 186 | - [ ] [B. Maximum of Maximums of Minimums](https://codeforces.com/problemset/problem/872/B) 187 | - [ ] [CGCDSSQ](https://codeforces.com/contest/475/problem/D) 188 | - [ ] [D. R2D2 and Droid Army](https://codeforces.com/problemset/problem/514/D) 189 | 190 | ### Disjoint Set Union 191 | 192 | 1. #### Reading Material 193 | - [ ] [:movie_camera:](https://www.youtube.com/watch?v=0jNmHPfA_yE)[Tutorial](https://cp-algorithms.com/data_structures/disjoint_set_union.html) 194 | 195 | 2. #### Problems 196 | - [ ] [D. Roads not only in Berland](https://codeforces.com/contest/25/problem/D) 197 | - [ ] [HackerEarth CodeMonk: DSU](https://www.hackerearth.com/challenges/competitive/code-monk-disjoint-set-union-union-find/) 198 | 199 |
200 | 201 | *** 202 | 203 |
204 | Week 6 205 | 206 | Square Root Decomposition 207 | 208 | 1. #### Reading Material 209 | - [ ] [Tutorial 1: Base Concept + Mo's algorithm](https://cp-algorithms.com/data_structures/sqrt_decomposition.html) 210 | - [ ] [Tutorial 2](https://codeforces.com/blog/entry/20489) 211 | - [ ] [Tutorial 3 : Read the comments](https://codeforces.com/blog/entry/16883) 212 | - [ ] [Tutorial 4 : Video Lecture, find slides in video description](https://www.youtube.com/watch?v=VGq6w9TlJBY) 213 | - [ ] [Tutorial 5 : Exhaustive PDF](http://acm.math.spbu.ru/~sk1/mm/lections/mipt2016-sqrt/mipt-2016-burunduk1-sqrt.en.pdf) 214 | - [ ] [Tutorial 6 : Mo's Algorithm](https://blog.anudeep2011.com/mos-algorithm/) 215 | 216 | 217 | 2. #### Problems 218 | 219 | - [ ] [CHEFXQ](https://www.codechef.com/problems/CHEFEXQ) 220 | - [ ] [RACETIME](https://www.spoj.com/problems/RACETIME) 221 | - [ ] [GIVEAWAY](http://www.spoj.com/problems/GIVEAWAY/) 222 | - [ ] [13E](http://codeforces.com/contest/13/problem/E) 223 | - [ ] [342E](https://codeforces.com/contest/342/problem/E) 224 | - [ ] [DQUERY](http://www.spoj.com/problems/DQUERY/) 225 | - [ ] [375D](http://codeforces.com/problemset/problem/375/D) 226 | - [ ] [840D](http://codeforces.com/contest/840/problem/D) 227 | - [ ] [86D](https://codeforces.com/contest/86/problem/D) 228 | - [ ] [398D](https://codeforces.com/contest/398/problem/D) 229 | - [ ] [GERALD07](https://www.codechef.com/problems/GERALD07) 230 | - [ ] [MKTHNUM](https://www.spoj.com/problems/MKTHNUM/) 231 | 232 |
233 | 234 | *** 235 | 236 |
237 | Week 7 238 | 239 | Segment Tree 240 | 241 | 1. #### Reading Material 242 | - [ ] [Tutorial](https://cp-algorithms.com/data_structures/segment_tree.html) 243 | 244 | 2. #### Problems 245 | - [ ] [D. Distinct Characters Queries](https://codeforces.com/problemset/problem/1234/D) 246 | - [ ] [A. Knight Tournament](https://codeforces.com/contest/356/problem/A) 247 | - [ ] [F. Ant colony](https://codeforces.com/contest/474/problem/F) 248 | - [ ] [E. Drazil and Park](https://codeforces.com/contest/515/problem/E) 249 | - [ ] [C. DZY Loves Fibonacci Numbers](https://codeforces.com/contest/446/problem/C) 250 | 251 |
252 | 253 | *** 254 | 255 |
256 | Week 8 257 | 258 | ## Week 8 259 | Fenwick Tree 260 | 261 | 1. #### Reading Material 262 | - [ ] [Tutorial](https://cp-algorithms.com/data_structures/fenwick.html) 263 | 264 | 2. #### Problems 265 | - [ ] [E. Little Artem and Time Machine](https://codeforces.com/contest/669/problem/E) 266 | - [ ] [E. Hanoi Factory](https://codeforces.com/contest/777/problem/E) 267 | - [ ] [C. Subsequences](https://codeforces.com/contest/597/problem/C) 268 | - [ ] [D. Ball](https://codeforces.com/contest/12/problem/D) 269 | - [ ] [E. Garlands](https://codeforces.com/contest/707/problem/E) 270 | 271 |
272 | 273 | *** 274 | 275 |
276 | Why use this list? 277 | 278 | Since getting better at competitive programming takes a lot of effort, you need to keep practicing a lot of problems. This list will keep you focussed and you will have a target with you that you need to finish atleast these many problems before moving on. It can help you organize your practice. 279 | 280 |
281 | 282 | *** 283 | 284 |
285 | How to use this list? 286 | 287 | The Github markdown's task list feature is used to check progress. 288 | 289 | **Create a new branch so that you can check items like this, just put a x in the brackets: [x]** 290 | 291 | - **One time steps**: 292 | 1. Fork this repository. 293 | 2. Clone the forked repository. 294 | 295 | `git clone https://github.com/your_user_name/Get_Better_at_CP_in_2_Months.git` 296 | 297 | 3. Create a new branch for tracking your progress. Let's name this *your_user_name* 298 | 299 | `git checkout -b your_user_name` 300 | 301 | 4. Add remote 302 | 303 | `git remote add your_user_name https://github.com/your_user_name/Get_Better_at_CP_in_2_Months.git` 304 | 305 | - **Marking tasks as completed and pushing to your branch**: 306 | 307 | git add . 308 | git commit -m "Completed tasks x and y" 309 | git rebase your_user_name/master 310 | git push --force 311 | 312 | - **Keeping your fork's list updated with the changes made here**: 313 | 314 | git remote add upstream https://github.com/sahilbansal17/Get_Better_at_CP_in_2_Months.git 315 | git checkout master 316 | git pull upstream master 317 | git push your_user_name master 318 | 319 | Refer to [this](https://github.com/susam/gitpr/blob/master/README.md) for understanding more about Fork and PR workflow. 320 | 321 |
322 | 323 | *** 324 | --------------------------------------------------------------------------------