Learn Data Structures and Algorithms _ DSA tutorials _ CodeChef
Learn Data Structures and Algorithms _ DSA tutorials _ CodeChef
Upgrade To Pro
We use cookies to improve your experience and for analytical purposes. Read our Privacy Policy and Terms to know more. You consent to our
cookies if you continue to use our website. Okay
https://www.codechef.com/certification/data-structures-and-algorithms/prepare#foundation 1/15
12/25/23, 2:45 AM Learn Data Structures and Algorithms | DSA tutorials | CodeChef
This section lists out the syllabus, the learning resources and Mock Tests to help you prepare for the data structures and algorithms
Certification test. The resources that we list here are references that we have collected over the internet and some of them from our
own website. While we do recommend these resources based on the inputs of our user community, we do not claim that these are
the most authoritative Learning Resources about any topic in data structures and algorithms. Please feel free to find out what suits
best to you.
We have also prepared a Mock Test for each level. A Mock Test is an open assessment contest that will help you assess yourself
after you are ready with the topics. For each level we have different Mock Tests. These DSA contests will run forever.
Update:
If you are new to programming, you should start with our learn to code paths. They have curated content with lessons and practical
problems to practice.
If you already know programming, start from our problem-solving or DSA learning paths from the learn catalog page.
Foundation
Syllabus:
Learning Resources:
1. Asymptotic analysis (Big-O notation)
a. Basic
b. Advanced
c. to
We use cookies Practice
improveProblems
your experience and for analytical purposes. Read our Privacy Policy and Terms to know more. You consent to our
cookies if you continue to use our website.
i Check some MCQs on space and time complexity here
https://www.codechef.com/certification/data-structures-and-algorithms/prepare#foundation 2/15
12/25/23, 2:45 AM Learn Data Structures and Algorithms | DSA tutorials | CodeChef
i. Check some MCQs on space and time complexity here.
ii. You can see some problems with solutions here: Time complexity of an algorithm
2. Arrays
a. Resources
b. Practice Problems
3. Strings
a. Resources
b. Practice Problems
a. Resources
b. Practice Problems
i. spoj.com - JNEXT
ii. spoj.com - STPAR
iii. spoj.com - ONP
iv. codechef.com - COMPILER
v. spoj.com - MMASS
vi. spoj.com - HISTOGRA
vii. codeforces.com - D. Maximum Xor Secondary
viii. spoj.com - ANARC09A
ix. codeforces.com - C. Minimal string
x. codeforces.com - B. Alternating Current
xi. codeforces.com - C. Longest Regular Bracket Sequence
We use5.cookies
Basic math operations
to improve (addition,
your experience subtraction,
and for analytical multiplication,
purposes. Read our Privacydivision,
Policy and exponentiation)
Terms to know more. You consent to our
cookies if you continue to use our website.
a codechef com A tutorial on Fast Modulo Multiplication
https://www.codechef.com/certification/data-structures-and-algorithms/prepare#foundation 3/15
12/25/23, 2:45 AM Learn Data Structures and Algorithms | DSA tutorials | CodeChef
a. codechef.com - A tutorial on Fast Modulo Multiplication
a. Resources
a. Resources:
i. Only O(sqrt(n)) algorithm for finding whether a number is a prime, factorization of a number.
ii. Finding prime factors by taking the square root
b. Practice Problems:
i. community.topcoder.com - DivisorInc
ii. community.topcoder.com - Prime Polynom
iii. community.topcoder.com - Prime Anagrams
iv. community.topcoder.com - Refactoring
8. Basic Recursion
a. Resources
b. Practice Problems
9. Greedy Algorithms
a. Resources
b. Practice Problems
a. Resources
i. Dynamic Programming I
ii. Dynamic Programming II
iii. Dynamic Programming III
iv. Dynamic Programming IV
b. Practice Problems
a. Resources
12. Sorting
a. khanacademy.org
b. visualgo.net
c. iarcs.org.in
d. Merge sort
We use cookies toi.improve your experience
youtube.com - Mergeandsort
for analytical
algorithm purposes. Read our Privacy Policy and Terms to know more. You consent to our
cookies if you continue to use our website.
ii P ti P bl
https://www.codechef.com/certification/data-structures-and-algorithms/prepare#foundation 5/15
12/25/23, 2:45 AM Learn Data Structures and Algorithms | DSA tutorials | CodeChef
ii. Practice Problems
codechef.com -MRGSRT
e. Quick sort
f. Counting sort
a. Resources
i. topcoder.com (Try solving problems of Simple and Moderate level as mentioned in the end of the link)
ii. codechef.com
iii. usfca.edu
iv. khanacademy.org
c. Problems
Past Test:
Practice on the exact problems which had appeared in a past DSA Foundation level exam:
We use1.cookies
Testto1 improve your experience and for analytical purposes. Read our Privacy Policy and Terms to know more. You consent to our
- https://www.codechef.com/FLPAST01
cookies if you continue to use our website.
https://www.codechef.com/certification/data-structures-and-algorithms/prepare#foundation 6/15
12/25/23, 2:45 AM Learn Data Structures and Algorithms | DSA tutorials | CodeChef
Mock Test:
1. Test 1 - codechef.com/FLMOCK01
2. Test 2 - codechef.com/FLMOCK02
3. Test 3 - codechef.com/FLMOCK03
4. Test 4 - codechef.com/FLMOCK04
Advanced
This level is intended to test that the one has a very good grasp of data structures and algorithms, and can solve most problems
that arise in practice. You can expect problems from the following topics to come in the DSA exam.
Syllabus:
Learning Resources:
a. Resources
i. cs.cmu.edu
ii. eecs.wsu.edu
iii. geeksforgeeks.org
iv. visualgo.net
v. iarcs.org.in
b. Practice Problems
https://www.codechef.com/certification/data-structures-and-algorithms/prepare#foundation 7/15
12/25/23, 2:45 AM Learn Data Structures and Algorithms | DSA tutorials | CodeChef
a. Resources
i. topcoder.com
ii. harvard.edu
iii. ucdavis.edu
iv. visualgo.net
b. Practice Problems
3. Segment Trees
a. Resources
i. wcipeg.com
ii. topcoder.com
iii. kartikkukreja.wordpress.com
iv. visualgo.net
v. iarcs.org.in
b. Practice Problems
i. spoj.com - GSS1
ii. spoj.com - GSS2
iii. codeforces.com - Classic Segment Tree (Expert Level)
iv. spoj.com - IOPC1207
v. spoj.com - ORDERSET
vi. spoj.com - HELPR2D2
vii. spoj.com - ANDROUND
viii. spoj.com - HEAPULM
ix. spoj.com - NICEDAY
x. spoj.com - YODANESS
xi. spoj.com - DQUERY
We use cookies to improve your experience and for analytical purposes. Read our Privacy Policy and Terms to know more. You consent to our
xii. spoj.com - KQUERY
cookies if you continue to use our website.
https://www.codechef.com/certification/data-structures-and-algorithms/prepare#foundation 8/15
12/25/23, 2:45 AM Learn Data Structures and Algorithms | DSA tutorials | CodeChef
xiii. spoj.com - FREQUENT
xiv. spoj.com - GSS3
xv. spoj.com - GSS4
xvi. spoj.com - GSS5
xvii. spoj.com - KGSS
xviii. spoj.com - HELPR2D2
xix. spoj.com - BRCKTS
xx. spoj.com - CTRICK
xxi. spoj.com - MATSUM
xxii. spoj.com - RATING
xxiii. spoj.com - RRSCHED
xxiv. spoj.com - SUPPER
xxv. spoj.com - ORDERS
xxvi. codechef.com - LEBOBBLE
xxvii. codechef.com - QUERY
xxviii. spoj.com - TEMPLEQ
xxix. spoj.com - DISUBSTR
xxx. spoj.com - QTREE
xxxi. spoj.com - QTREE2
xxxii. spoj.com - QTREE3
xxxiii. spoj.com - QTREE4
xxxiv. spoj.com - QTREE5
a. Resources
i. topcoder.com
ii. iarcs.org.in
iii. visualgo.net
b. Practice Problems:
Please solve the problems mentioned in the above segment tree practice problems section. Note that usually, it's difficult to
do range updates in binary indexed trees. Mostly, it is used for for range query and point update. However, you can check
the following article for checking how some simple specific kind of range updates can be performed on binary indexed tree
We use cookies to improve your experience and for analytical purposes. Read our Privacy Policy and TermsNote
(http://petr-mitrichev.blogspot.in/2013/05/fenwick-tree-range-updates.html). to know
thatmore.
rangeYou consent on
updates to our
BIT is not a part of
cookies if you continue to use our website.
the syllabus.
https://www.codechef.com/certification/data-structures-and-algorithms/prepare#foundation 9/15
12/25/23, 2:45 AM Learn Data Structures and Algorithms | DSA tutorials | CodeChef
i. spoj.com - INVCNT
ii. spoj.com - TRIPINV
5. Trees (traversals)
a. Resources
i. slideshare.net
ii. iarcs.org.in
iii. berkeley.edu
b. Practice Problems
i. spoj.com - TREEORD
a. Resources
i. topcoder.com
7. Depth First Search, Breadth First Search (Finding connected components and transitive closures)
a. Resources
b. Practice Problems
a. Resources
b. Practice Problems
a. Resources
b. Practice Problem
i. community.topcoder.com - PeopleYouMayKnow
ii. codeforces.com - D. Robot Control
iii. spoj.com - ARBITRAG - Arbitrage ;(Floyd Warshall)
iv. community.topcoder.com - NetworkSecurity ;(Floyd Warshall)
a. Resources
b. Practice Problem
i. spoj.com - MST
ii. spoj.com - NITTROAD
iii. spoj.com - BLINNET
iv. spoj.com - CSTREET
v. spoj.com - HIGHWAYS
vi. spoj.com - IITWPC4I
vii. codechef.com - MSTQS, editorial
viii. codechef.com - CHEFGAME, editorial
ix. codechef.com - GALACTIK, editorial
x. codechef.com - GOOGOL03, editorial
xi. spoj.com - KOICOST
a. Resources
b. Practice Problem
i. uva.onlinejudge.org - Network
ii. icpcarchive.ecs.baylor.edu - Building Bridges
iii. uva.onlinejudge.org - Tourist Guide
iv. tzcoder.cn - Network
v. spoj.com - EC_P - Critical Edges
vi. spoj.com - SUBMERGE - Submerging Islands
vii. spoj.com - POLQUERY - Police Query
We use cookies to improve your experience and for analytical purposes. Read our Privacy Policy and Terms to know more. You consent to our
viii. codeforces.com
cookies if you continue - A. Cutting Figure
to use our website.
https://www.codechef.com/certification/data-structures-and-algorithms/prepare#foundation 11/15
12/25/23, 2:45 AM Learn Data Structures and Algorithms | DSA tutorials | CodeChef
a. Resources
b. Practice Problem
i. spoj.com - ANTTT
ii. spoj.com - CAPCITY
iii. spoj.com - SUBMERGE
iv. codechef.com - MCO16405, editorial
v. spoj.com - BOTTOM
vi. spoj.com - BREAK
vii. community.topcoder.com - Marble Collection Game
a. Resources
b. Practice Problem
i. spoj.com - TOPOSORT ;
ii. codeforces.com - C. Fox And Names ;
iii. codechef.com - RRDAG, editorial
iv. spoj.com - RPLA
v. codechef.com - CL16BF (topological sort with dp), editorial
vi. spoj.com - MAKETREE
a. Resources
b. Practice Problem
i. spoj.com - WORDS1
ii. codechef.com - CHEFPASS, editorial
iii. codechef.com - TOURISTS, editorial
iv. codeforces.com - D. New Year Santa Network
v. B. Strongly Connected City
vi. codechef.com - PEOPLOVE
vii. codeforces.com - D. Tanya and Password
viii. codeforces.com - E. One-Way Reform
ix. spoj.com - GCPC11C
x. spoj.com - MAKETREE
a. Resources
a. Resources
https://www.codechef.com/certification/data-structures-and-algorithms/prepare#foundation 12/15
12/25/23, 2:45 AM Learn Data Structures and Algorithms | DSA tutorials | CodeChef
17. Divide and Conquer
a. Resources
b. Practice Problem
18. Advanced Dynamic Programming problems (excluding the dp optimizations which are added in expert level, Please go
through the basic DP resources and problems mentioned in foundation level resource.)
a. Resources
https://www.codechef.com/certification/data-structures-and-algorithms/prepare#foundation 13/15
12/25/23, 2:45 AM Learn Data Structures and Algorithms | DSA tutorials | CodeChef
a. Resources:
b. Practice Problems
i. spoj.com - TDKPRIME
ii. spoj.com - TDPRIMES
iii. spoj.com - ODDDIV ;(sieve + binary search)
iv. spoj.com - NDIVPHI ;O(N) prime testing algorithm)
v. spoj.com - DIV ;(divisor sieve)
vi. codechef.com - LEVY, editorial
vii. codechef.com - PRETNUM, editorial
viii. codechef.com - KPRIME, editorial
ix. codechef.com - DIVMAC, editorial (segment tree with sieve)
x. codechef.com - PPERM, editorial ;(a bit advanced sieve application)
20. General
a. Stanford Algorithm 1
b. Stanford Algorithm 2
Past Test:
Practice on the exact problems which had appeared in a past Advanced level exam:
1. Test 1 - https://www.codechef.com/ALPAST01
Mock Test:
1. Test 1 - https://www.codechef.com/ADMOCK01
2. Test 2 - https://www.codechef.com/ADMOCK02
Note: These links have been curated to help the community learn Data structures and algorithms. But if you own some of the material
linked to, and you would not like them to be here, please contact us, and we will remove it.
We use cookies to improve your experience and for analytical purposes. Read our Privacy Policy and Terms to know more. You consent to our
cookies if you continue to use our website.
https://www.codechef.com/certification/data-structures-and-algorithms/prepare#foundation 14/15
12/25/23, 2:45 AM Learn Data Structures and Algorithms | DSA tutorials | CodeChef
More Usage Policy
Contact Us Terms
User Ranklist
Follow Us
www.codechef.com
We use cookies to improve your experience and for analytical purposes. Read our Privacy Policy and Terms to know more. You consent to our
cookies if you continue to use our website.
https://www.codechef.com/certification/data-structures-and-algorithms/prepare#foundation 15/15