Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

DSA sheet for CSE students, Assignments of Programming Languages

Stivers top rates DSA assignment sheet

Typology: Assignments

2021/2022

Uploaded on 10/27/2022

the-sith-lord
the-sith-lord 🇮🇳

1 document

1 / 7

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Striver’s CP List(Solely for preparing for Coding Rounds of Top
Prod Based Companies and to do well in Coding Sites and
Competitions)
SDE SHEET:https://bit.ly/takeUforward_SDE
SUCCESS stories of SDE sheet at Insta profile: striver_79
All the following questions have been answered in this video ->
https://youtu.be/QtTPohzfxA8
1. What does the CP list primarily focus on ?
2. How have the problems been selected ?
3. How many problems do you need to do in order to get concepts required for coding
rounds ?
4. What apart from the CP list do we need to do?
Pre-requisites: Point 1 and Point 2
1. Before starting off CP, make sure you know one language, which means you how to
take an input, print something, run for loops, snd STL/Collection for the language you
are using, these things are more than enough to start, just don’t think you need
everything in place to start, so just start.
2. At first make sure your constructive algorithms are good, which means you can solve
simple story line problems. For that my suggestion will be to do A2OJ
ladder(alternative: https://a2oj.herokuapp.com/), 50 A problems and 50 B level
problems to start off with.
3. Next I will be giving you the algorithms name you need to know and 5-10 problems
on each of them. These problems will help you to understand the concept of the
algorithm, and will help you to understand how we can tweak the algorithms to solve
given problems. Even after this you don’t feel comfortable with the Algorithm, my
suggestion will be to google some more problems and solve. To reach an expert level
at Codeforces, you just need to solve A, B and C problems at quick succession and
on a constant basis. There are very few chances that you will be encountering an
algorithmic problem on Codeforces unless and until its the D level problem or
beyond. So you need to do as many algorithmic problems as you can, which will help
you during your coding rounds.
Note: The Algorithmic Problems might require a mixture of Algorithms in order to be
solved, so be careful while you think, just don’t think on a particular algo only.
Disclaimer: If you feel it's getting tough, I will suggest to do SDE sheet as well as
you can, and take the concepts as properly as you can!!
Linear Search:
pf3
pf4
pf5

Partial preview of the text

Download DSA sheet for CSE students and more Assignments Programming Languages in PDF only on Docsity!

Striver’s CP List(Solely for preparing for Coding Rounds of Top

Prod Based Companies and to do well in Coding Sites and

Competitions)

SDE SHEET : https://bit.ly/takeUforward_SDE SUCCESS stories of SDE sheet at Insta profile: striver_ All the following questions have been answered in this video -> https://youtu.be/QtTPohzfxA

  1. What does the CP list primarily focus on?
  2. How have the problems been selected?
  3. How many problems do you need to do in order to get concepts required for coding rounds?
  4. What apart from the CP list do we need to do? Pre-requisites: Point 1 and Point 2
  5. Before starting off CP, make sure you know one language, which means you how to take an input, print something, run for loops, snd STL/Collection for the language you are using, these things are more than enough to start, just don’t think you need everything in place to start, so just start.
  6. At first make sure your constructive algorithms are good, which means you can solve simple story line problems. For that my suggestion will be to do A2OJ ladder(alternative: https://a2oj.herokuapp.com/), 50 A problems and 50 B level problems to start off with.
  7. Next I will be giving you the algorithms name you need to know and 5-10 problems on each of them. These problems will help you to understand the concept of the algorithm, and will help you to understand how we can tweak the algorithms to solve given problems. Even after this you don’t feel comfortable with the Algorithm, my suggestion will be to google some more problems and solve. To reach an expert level at Codeforces, you just need to solve A, B and C problems at quick succession and on a constant basis. There are very few chances that you will be encountering an algorithmic problem on Codeforces unless and until its the D level problem or beyond. So you need to do as many algorithmic problems as you can, which will help you during your coding rounds. Note : The Algorithmic Problems might require a mixture of Algorithms in order to be solved, so be careful while you think, just don’t think on a particular algo only. Disclaimer : If you feel it's getting tough, I will suggest to do SDE sheet as well as you can, and take the concepts as properly as you can!! Linear Search:
  1. https://www.hackerearth.com/practice/algorithms/searching/linear-search/prac tice-problems/algorithm/simple-search-4/
  2. https://www.hackerearth.com/practice/algorithms/searching/linear-search/prac tice-problems/algorithm/maximum-sum-4-f8d12458/
  3. https://www.hackerearth.com/practice/algorithms/searching/linear-search/prac tice-problems/algorithm/mannas-first-name-4/
  4. https://www.codechef.com/problems/SEGM
  5. https://www.hackerearth.com/practice/algorithms/searching/linear-search/prac tice-problems/algorithm/rest-in-peace-21-1/ Hashing : (Basic and not String Hashing)
  6. https://www.hackerearth.com/practice/data-structures/hash-tables/basics-of-h ash-tables/practice-problems/algorithm/maximum-occurrence-9/
  7. https://codeforces.com/problemset/problem/4/C
  8. https://www.hackerearth.com/practice/data-structures/hash-tables/basics-of-h ash-tables/practice-problems/algorithm/perfect-pair-df920e90/description/
  9. https://codeforces.com/problemset/problem/486/B PrefixSum:
  10. https://www.spoj.com/problems/CSUMQ/
  11. https://www.codecProblem CSUMQhef.com/problems/BLONDIE
  12. https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&categor y=24&page=show_problem&problem=
  13. https://www.hackerrank.com/contests/ab-yeh-kar-ke-dikhao/challenges/kj-and -street-lights/leaderboard (learn the scanline algo trick, probably from here https://www.youtube.com/watch?v=TSUvGqRFlug (timeStamp: 2:00)
  14. https://www.codechef.com/COW42020/problems/COW3E/ (2d prefix sum)
  15. https://www.codechef.com/problems/COWA19B
  16. https://www.codechef.com/problems/MXPOWER Sliding Window:
  17. https://www.hackerrank.com/challenges/min-max-riddle/problem (uses nge, read in stacks)
  18. https://codeforces.com/problemset/problem/363/B
  19. https://www.codechef.com/problems/SHIVIGOD (try to do using sliding window)
  20. https://www.codechef.com/problems/BDGFT
  21. https://www.codechef.com/problems/ECAPR
  22. https://codeforces.com/problemset/problem/1341/B
  23. https://www.codechef.com/problems/SUMPOWER (Can be solved using prefix sum, but try to do without that by using O(1) space) Binary Search : (make sure you watch STL of BS -> https://www.youtube.com/watch?v=edJ19qIL8WQ)
  24. https://www.hackerearth.com/practice/algorithms/searching/binary-search/pra ctice-problems/algorithm/bishu-and-soldiers/
  1. https://www.hackerearth.com/practice/basic-programming/bit-manipulation/ba sics-of-bit-manipulation/practice-problems/algorithm/power-of-2-6/
  2. https://codeforces.com/problemset/problem/1095/C
  3. https://codeforces.com/problemset/problem/1202/A
  4. https://codeforces.com/problemset/problem/1152/B
  5. https://codeforces.com/problemset/problem/611/B
  6. https://codeforces.com/problemset/problem/1097/B (Power Set use)
  7. https://codeforces.com/problemset/problem/276/D Greedy Algorithms (A topic in which you need to many many problems) :
  8. https://codeforces.com/problemset/problem/1291/A
  9. https://codeforces.com/problemset/problem/1375/B
  10. https://codeforces.com/problemset/problem/1294/C
  11. https://codeforces.com/problemset/problem/1285/B (Kadane’s Algo pre-req)
  12. https://codeforces.com/problemset/problem/1201/B
  13. https://codeforces.com/problemset/problem/274/A
  14. https://codeforces.com/problemset/problem/413/C
  15. https://codeforces.com/problemset/problem/1368/B
  16. https://codeforces.com/problemset/problem/1291/B Divide and Conquer:
  17. https://leetcode.com/problems/reverse-pairs/ (Check my video on YT)
  18. https://codeforces.com/problemset/problem/768/B
  19. https://cses.fi/problemset/task/
  20. https://codeforces.com/problemset/problem/1263/C
  21. https://codeforces.com/problemset/problem/1249/C
  22. https://codeforces.com/problemset/problem/1373/D Stack/Queues/PriorityQueues:
  23. https://www.hackerrank.com/challenges/balanced-brackets/problem
  24. https://www.codechef.com/status/THESA
  25. https://www.spoj.com/problems/ANARC09A/
  26. https://www.hackerearth.com/practice/data-structures/queues/basics-of-queu es/practice-problems/algorithm/monk-and-power-of-time-3a648bf0/
  27. https://www.hackerearth.com/challenges/competitive/code-monk-heaps-and-p riority-queues-1/algorithm/little-monk-and-williamson/
  28. https://codeforces.com/contest/5/problem/C
  29. https://www.hackerearth.com/practice/data-structures/stacks/basics-of-stacks/ practice-problems/algorithm/little-shino-and-pairs/
  30. https://www.hackerearth.com/practice/data-structures/trees/heapspriority-que ues/practice-problems/algorithm/seating-arrangement-6b8562ad/ String Algorithms(Hashing, Rabin Karp, KMP, Z-Function, Manacher’s Algo):
  31. http://codeforces.com/problemset/problem/271/D
  32. https://www.spoj.com/problems/NHAY/
  33. https://www.spoj.com/problems/NAJPF/
  1. https://onlinejudge.org/index.php?option=onlinejudge&page=show_problem& problem=
  2. http://codeforces.com/problemset/problem/126/B
  3. http://codeforces.com/problemset/problem/271/D
  4. https://www.codechef.com/problems/RUNNING
  5. https://www.codechef.com/problems/INSQ15_A
  6. https://codeforces.com/problemset/problem/346/B
  7. https://codeforces.com/problemset/problem/432/D (Trees must be known)
  8. https://leetcode.com/problems/longest-palindromic-substring/ (Manacher’s)
  9. https://leetcode.com/problems/longest-palindromic-substring/
  10. https://codeforces.com/contest/1080/problem/E (Super tough) Tree’s (DFS, LCA, Subtree size .. ) :
  11. https://cses.fi/problemset/task/
  12. https://cses.fi/problemset/task/
  13. https://www.spoj.com/problems/ABCPATH/
  14. https://cses.fi/problemset/task/
  15. https://codeforces.com/problemset/problem/1336/A
  16. https://codeforces.com/contest/734/problem/E (Bit tougher DFS)
  17. https://cses.fi/problemset/task/1688 (LCA)
  18. https://www.spoj.com/problems/DISQUERY/
  19. https://cses.fi/problemset/task/1131 (LCA)
  20. https://cses.fi/problemset/task/1135 (LCA)
  21. https://codeforces.com/contest/208/problem/E
  22. https://codeforces.com/contest/1328/problem/E
  23. https://codeforces.com/contest/519/problem/E
  24. Still want more for LCA, find here -> https://codeforces.com/blog/entry/ Graph Algorithms (DFS, BFS, Dijsktra, Floyd Washall, Bellman Ford, Bridges, 0-1 BFS, Bipartite, Topo-sort ...) :
  25. https://cses.fi/problemset/task/1192 (bfs)
  26. https://cses.fi/problemset/task/
  27. https://codeforces.com/problemset/problem/242/C
  28. https://cses.fi/problemset/task/1193 (Connected Components)
  29. https://cses.fi/problemset/task/
  30. https://cses.fi/problemset/task/
  31. https://cses.fi/problemset/task/1671 (Dijsktra)
  32. https://codeforces.com/problemset/problem/20/C
  33. https://cses.fi/problemset/task/1672 (Floyd Warshall)
  34. https://cses.fi/problemset/task/
  35. https://cses.fi/problemset/task/1197 (Bellman Ford)
  36. https://cses.fi/problemset/task/1679 (topo sort)
  37. https://codeforces.com/problemset/problem/510/C
  38. https://codeforces.com/problemset/problem/59/E (tough Dijsktra)
  39. https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=s how_problem&problem=
  40. https://www.spoj.com/problems/SUBMERGE/

Fenwick Tree:

  1. https://www.spoj.com/problems/INVCNT/
  2. https://codeforces.com/gym/100741/problem/A
  3. https://www.spoj.com/problems/MATSUM/
  4. https://codeforces.com/gym/100741/problem/A
  5. https://www.spoj.com/problems/DQUERY/
  6. https://codeforces.com/problemset/problem/61/E Segment Tree(lazy also included):
  7. https://cses.fi/problemset/task/
  8. https://cses.fi/problemset/task/
  9. https://codeforces.com/problemset/problem/61/E
  10. https://codeforces.com/contest/356/problem/A
  11. https://codeforces.com/contest/459/problem/D
  12. https://codeforces.com/contest/61/problem/E
  13. https://codeforces.com/contest/380/problem/C
  14. https://www.hackerearth.com/practice/data-structures/advanced-data-structur es/fenwick-binary-indexed-trees/practice-problems/algorithm/help-ashu-1/
  15. https://codeforces.com/contest/52/problem/C
  16. https://codeforces.com/contest/52/problem/C
  17. https://codeforces.com/contest/558/problem/E
  18. https://codeforces.com/contest/558/problem/E
  19. https://codeforces.com/contest/558/problem/E