├── README.md ├── Workshop1(Segment tree and graph theory) ├── PCONday2.txt ├── PCONday3_4.txt └── PconDay1.txt └── Workshop2(Dp and trie) ├── Day1.txt ├── Day2.txt └── Day3(Dp,Trie).txt /README.md: -------------------------------------------------------------------------------- 1 | References and questions for all workshops conducted on competitive programming in the session 2019-20. 2 | The mission -- To help build the community of CP. 3 | -------------------------------------------------------------------------------- /Workshop1(Segment tree and graph theory)/PCONday2.txt: -------------------------------------------------------------------------------- 1 | Day 2 2 | 3 | Lazy Propagation- 4 | 5 | References 6 | 7 | Hackerearth-- https://www.hackerearth.com/practice/notes/segment-tree-and-lazy-propagation/ 8 | 9 | Cp-Algorithms-- https://cp-algorithms.com/data_structures/segment_tree.html (see at the last of the page) 10 | 11 | Segment tree beats-- https://codeforces.com/blog/entry/57319 12 | 13 | 14 | Questions: 15 | 16 | https://www.hackerearth.com/practice/data-structures/advanced-data-structures/segment-trees/practice-problems/algorithm/binary-modulo-841ce0c7/ (point update) 17 | 18 | https://www.codechef.com/problems/FLIPCOIN (Done in class) 19 | 20 | https://www.hackerearth.com/practice/data-structures/advanced-data-structures/segment-trees/practice-problems/algorithm/monk-and-otakuland-1/ 21 | 22 | https://www.codechef.com/SEPT17/problems/SEACO (Please try this one) 23 | 24 | https://codeforces.com/problemset/problem/722/C 25 | 26 | https://www.hackerrank.com/contests/pcon-round-2/challenges/simple-tree (based on segment tree beats- try after reading euler tour in tree) 27 | -------------------------------------------------------------------------------- /Workshop1(Segment tree and graph theory)/PCONday3_4.txt: -------------------------------------------------------------------------------- 1 | Day 3-4 2 | 3 | Trees and Graphs- 4 | 5 | References 6 | 7 | Hackerearth-- https://www.hackerearth.com/practice/algorithms/graphs/breadth-first-search/tutorial/ (BFS) 8 | https://www.hackerearth.com/practice/algorithms/graphs/depth-first-search/tutorial/ (DFS) 9 | 10 | Cp-Algorithms-- https://cp-algorithms.com/graph/depth-first-search.html (DFS) 11 | https://cp-algorithms.com/graph/breadth-first-search.html (BFS) 12 | 13 | 14 | Questions: 15 | 16 | 1. https://www.hackerearth.com/practice/algorithms/graphs/depth-first-search/practice-problems/algorithm/sg-and-trees/ (Discussed on day 3 in class) 17 | 18 | 2. https://www.hackerearth.com/practice/algorithms/graphs/depth-first-search/practice-problems/algorithm/monk-and-xor-tree/ (Discussed on day 4) 19 | 20 | 3. https://www.hackerearth.com/practice/algorithms/graphs/depth-first-search/practice-problems/algorithm/words-and-trees-f9ef202c/ 21 | 22 | 4. https://www.hackerearth.com/practice/algorithms/graphs/breadth-first-search/practice-problems/algorithm/dhoom-4/ 23 | 24 | 5. https://www.hackerearth.com/practice/algorithms/graphs/breadth-first-search/practice-problems/algorithm/big-p-and-party-1/ (basic) 25 | 26 | 6. https://www.hackerearth.com/practice/algorithms/graphs/depth-first-search/practice-problems/algorithm/little-monk-and-edge-count/ (must do) 27 | 28 | 7. https://www.hackerearth.com/practice/algorithms/graphs/depth-first-search/practice-problems/algorithm/color-the-graph/ (checkout what is a bipartite graph after doing this one) 29 | 30 | 8. https://www.codechef.com/problems/IITK1P10 (Similar question done in class) 31 | 32 | 9. https://www.hackerearth.com/practice/algorithms/graphs/breadth-first-search/practice-problems/algorithm/till-the-end-of-the-time-d73ba7d1/ 33 | 34 | 10. https://www.hackerearth.com/practice/algorithms/graphs/depth-first-search/practice-problems/algorithm/little-shino-and-k-ancestor-57fdef57/ 35 | 36 | 11. https://www.hackerearth.com/practice/algorithms/graphs/depth-first-search/practice-problems/algorithm/big-p-and-the-road-less-travelled-1/ 37 | 38 | 12. https://www.codechef.com/problems/SWITOG (Segment tee + Tree) 39 | 40 | https://www.codechef.com/problems/CLOVER (tough one) 41 | 42 | -------------------------------------------------------------------------------- /Workshop1(Segment tree and graph theory)/PconDay1.txt: -------------------------------------------------------------------------------- 1 | Day 1 2 | 3 | Segment Trees- 4 | 5 | References 6 | 7 | Hackerearth-- https://www.hackerearth.com/practice/data-structures/advanced-data-structures/segment-trees/tutorial/ 8 | 9 | Cp-Algorithms-- https://cp-algorithms.com/data_structures/segment_tree.html 10 | 11 | Questions 12 | 13 | https://www.hackerearth.com/practice/data-structures/advanced-data-structures/segment-trees/practice-problems/algorithm/shivam-and-expensive-birthday-gift-da58b2f0/ 14 | 15 | https://www.hackerearth.com/practice/data-structures/advanced-data-structures/segment-trees/practice-problems/algorithm/techno-tasks/ (done in class) 16 | 17 | https://www.hackerearth.com/practice/data-structures/advanced-data-structures/segment-trees/practice-problems/algorithm/k-th-bit-faae0e0d/ 18 | 19 | https://www.hackerearth.com/practice/data-structures/advanced-data-structures/segment-trees/practice-problems/algorithm/help-mona/ 20 | 21 | https://www.hackerearth.com/practice/data-structures/advanced-data-structures/segment-trees/practice-problems/algorithm/monk-and-otakuland-1/description/ 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /Workshop2(Dp and trie)/Day1.txt: -------------------------------------------------------------------------------- 1 | Reference------------------- 2 | 3 | LIS-- https://www.geeksforgeeks.org/longest-increasing-subsequence-dp-3/ 4 | Min cost path-- https://www.geeksforgeeks.org/min-cost-path-dp-6/ 5 | Kadane's Algorithm-- https://www.geeksforgeeks.org/largest-sum-contiguous-subarray/ 6 | 7 | 8 | Questions discussed in class---------------- 9 | 10 | 1. https://www.hackerearth.com/challenges/competitive/code-monk-dynamic-programming/algorithm/samu-and-shopping/ 11 | 12 | 2. https://www.hackerearth.com/problem/algorithm/birthday-gift-3/description/ 13 | 14 | 15 | Note- Questions for practice will be provided after second session. 16 | -------------------------------------------------------------------------------- /Workshop2(Dp and trie)/Day2.txt: -------------------------------------------------------------------------------- 1 | 2 | Reference------------------- 3 | 4 | 0-1 knapsack problem -- https://www.geeksforgeeks.org/0-1-knapsack-problem-dp-10/ 5 | Coin change problem(Minimum Coins)-- https://www.geeksforgeeks.org/find-minimum-number-of-coins-that-make-a-change/ 6 | Kadane's Algorithm-- https://www.geeksforgeeks.org/largest-sum-contiguous-subarray/ 7 | 8 | 9 | Questions discussed in class---------------- 10 | 11 | 1. https://www.hackerearth.com/practice/algorithms/dynamic-programming/introduction-to-dynamic-programming-1/practice-problems/algorithm/bike-trip/ (Toll problem) 12 | 13 | 2. https://www.hackerearth.com/practice/algorithms/dynamic-programming/introduction-to-dynamic-programming-1/practice-problems/algorithm/knapsack-with-large-weights-33a2433a/ (modified knapsack) 14 | 15 | Solution reference-- https://ideone.com/8OtrNI 16 | 17 | 18 | 3.https://codeforces.com/problemset/problem/1105/C (mod3 question) 19 | 20 | Solution reference-- https://codeforces.com/contest/1105/submission/64516976 21 | 22 | 23 | 4.https://codeforces.com/problemset/problem/161/D (Dp on trees) 24 | 25 | Solution reference-- https://ideone.com/n2QTdo 26 | 27 | 28 | Questions for practice---------------- 29 | 30 | https://www.hackerearth.com/practice/algorithms/dynamic-programming/introduction-to-dynamic-programming-1/practice-problems/algorithm/odd-even-subarrays-72ad69db/ (Easy) 31 | 32 | https://www.hackerearth.com/practice/algorithms/dynamic-programming/introduction-to-dynamic-programming-1/practice-problems/algorithm/once-upon-a-time-in-time-land/ (Easy) 33 | 34 | https://codeforces.com/problemset/problem/1249/E (Easy) 35 | 36 | https://www.hackerearth.com/practice/algorithms/dynamic-programming/introduction-to-dynamic-programming-1/practice-problems/algorithm/accomodation-a5c006f3/ (Easy) 37 | 38 | https://www.hackerearth.com/practice/algorithms/dynamic-programming/introduction-to-dynamic-programming-1/practice-problems/algorithm/xsquare-and-chocolates-bars-2/ (Easy,New) 39 | 40 | https://www.hackerearth.com/practice/algorithms/dynamic-programming/introduction-to-dynamic-programming-1/practice-problems/algorithm/sumits-sub-array-and-sub-sequence/ (Easy,New) 41 | 42 | https://codeforces.com/problemset/problem/106/C (1600,New) 43 | 44 | https://codeforces.com/problemset/problem/474/D (Medium,New) 45 | 46 | https://codeforces.com/problemset/problem/1096/D (Medium,New) 47 | 48 | https://codeforces.com/problemset/problem/1221/D (Easy medium) 49 | 50 | https://codeforces.com/problemset/problem/44/H (Easy-medium) 51 | 52 | https://codeforces.com/problemset/problem/431/C (Easy-medium,New) 53 | 54 | https://codeforces.com/problemset/problem/486/D (Medium-Hard,New) 55 | 56 | https://www.codechef.com/SNCK1A19/problems/CHEFADD (Kind of tough) 57 | -------------------------------------------------------------------------------- /Workshop2(Dp and trie)/Day3(Dp,Trie).txt: -------------------------------------------------------------------------------- 1 | 2 | Trie- 3 | 4 | References--------------- 5 | 6 | Hackerearth-- https://www.hackerearth.com/practice/data-structures/advanced-data-structures/trie-keyword-tree/practice-problems/ 7 | 8 | Questions discussed in class---------- 9 | 10 | https://codeforces.com/problemset/problem/264/B (DP) 11 | 12 | https://codeforces.com/problemset/problem/1051/D (DP) 13 | 14 | https://www.hackerearth.com/practice/data-structures/advanced-data-structures/trie-keyword-tree/practice-problems/algorithm/dummy4-2/ (Trie) 15 | 16 | Practice---- 17 | https://www.codechef.com/JUNE18B/problems/SHKSTR 18 | 19 | https://www.hackerearth.com/practice/data-structures/advanced-data-structures/trie-keyword-tree/practice-problems/algorithm/cost-of-data-11/ 20 | 21 | https://www.hackerearth.com/practice/data-structures/advanced-data-structures/trie-keyword-tree/practice-problems/algorithm/search-engine/ 22 | 23 | https://www.hackerearth.com/practice/data-structures/advanced-data-structures/trie-keyword-tree/practice-problems/algorithm/prasanjeet-verma-and-his-sorrow/ 24 | 25 | 26 | 27 | --------------------------------------------------------------------------------