DSA & Algorithm CodeChef Certificate Exam

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 13

Prepare

This sections lists out the syllabus, the learning resources and Mock Tests to help you prepare
for the 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. 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 for the certification exam after you are ready with
the topics. For each level we have different Mock Tests. These contests will run forever. We
strongly recommend you to solve these problems in same duration of time as the duration of
the exam before you take the exam.

Candidates can expect problems from the following topics to come in the exam.

Foundation

Syllabus:
The syllabus for each level is mentioned below:

 Basic Data Structures: Arrays, Strings, Stacks, Queues


 Asymptotic analysis (Big-O notation)
 Basic math operations (addition, subtraction, multiplication, division, exponentiation)
 Sqrt(n) primality testing
 Euclid’s GCD Algorithm
 Basic Recursion
 Greedy Algorithms
 Basic Dynamic Programming
 Naive string searching
 O(n logn) Sorting
 Binary Searching

Learning Resources:
 Asymptotic analysis (Big-O notation)
o Basic
 youtube.com - Time complexity of a computer program
 youtube.com - Big-O notation in 5 minutes - The basics
 youtube.com - Definition Of Big O Notation - Intro to Theoretical
Computer Science
 youtube.com - Algorithms Lecture 1 -- Introduction to asymptotic
notations
 iarcs.org.in - Measuring the efficiency of algorithms
 interactivepython.org - Particularly for Big-O notation
o Advanced
 rob-bell.net - A beginner's guide to Big O notation
 youtube.com - Big O Notation, Gayle Laakman McDowell
 web.mit.edu - Big O notation
 youtube.com - Time and space complexity analysis of recursive
programs - using factorial
 A very nice tutorial with examples
o Practice Problems
 You can see some problems with solutions here: Time complexity of
an algorithm
 Arrays
o Resources
 codechef.com - Data Structure Tutorial: Array
 cs.cmu.edu - Arrays
 geeksforgeeks.org - Arrays Data Structure
o Practice Problems
 codechef.com - LECANDY, editorial
 codechef.com - CNOTE, editorial ;
 codechef.com - SALARY, editorial
 codechef.com - CHN15A, editorial
 codechef.com - RAINBOWA, editorial
 codechef.com - FRGTNLNG, editorial
 codechef.com - COPS, editorial
 Strings
o Resources
 tutorialspoint.com - C++ strings
 guru99.com - Java strings
 docs.python.org - Python strings
 tutorialspoint.com - Python strings
 Many questions on the string:
 geeksforgeeks.org - String Data Structure
o Practice Problems
 codechef.com - CSUB, editorial
 codechef.com - LAPIN, editorial
 Stack and Queue
o Resources
 geeksforgeeks.org - Stack Data Structure
 geeksforgeeks.org - Introduction and Array Implementation
 tutorialspoint.com - Data Structures Algorithms
 cs.cmu.edu - Stacks
 cs.cmu.edu - Stacks and Queues
 cs.cmu.edu - Stacks and Queues
o Practice Problems
 spoj.com - JNEXT
 spoj.com - STPAR
 spoj.com - ONP
 spoj.com - COMPILER
 spoj.com - MMASS
 spoj.com - HISTOGRA
 codeforces.com - D. Maximum Xor Secondary
 spoj.com - ANARC09A
 codeforces.com - C. Minimal string
 codeforces.com - B. Alternating Current
 codeforces.com - C. Longest Regular Bracket Sequence
 Basic math operations (addition, subtraction, multiplication, division,
exponentiation)
o codechef.com - A tutorial on Fast Modulo Multiplication
 Euclid’s GCD Algorithm
o Resources
 youtube.com - Mycodeschool video
 khanacademy.org - The Euclidean Algorithm
 geeksforgeeks.org - Example program to find gcd in c++:
 Prime Numbers, divisibility of numbers
o Resources:
 Only O(sqrt(n)) algorithm for finding whether a number is a prime,
factorization of a number.
 Finding prime factors by taking the square root
o Practice Problems:
 community.topcoder.com - DivisorInc
 community.topcoder.com - Prime Polynom
 community.topcoder.com - Prime Anagrams
 community.topcoder.com - Refactoring
 Basic Recursion
o Resources
 topcoder.com - An Introduction to Recursion, Part 1
 topcoder.com - An Introduction to Recursion: Part 2
 geeksforgeeks.org - Recursion ;(along with questions)
 web.mit.edu - Recursion
 csee.umbc.edu - Recursion ;(Examples with exercises)
 loveforprogramming.quora.com - Backtracking, Memoization &
Dynamic Programming
o Practice Problems
 codechef.com - NOKIA, editorial
 codechef.com - TRISQ, editorial
 codechef.com - LFSTACK, editorial
 codechef.com - FICE, editorial
 Greedy Algorithms
o Resources
 iarcs.org.in - Greedy Algorithms
 iarcs.org.in - Greedy Algorithms
 topcoder.com - Greedy Algorithms
 Greedy Algorithms
o Practice Problems
 codechef.com - TACHSTCK, editorial
 codechef.com - CIELRCPT, editorial
 codechef.com - MAXDIFF, editorial
 codechef.com - CHEFST, editorial
 codechef.com - CAKEDOOM, editorial
 codechef.com - CLETAB, editorial
 codechef.com - TADELIVE, editorial
 codechef.com - MANYCHEF, editorial
 codechef.com - MMPROD, editorial
 codechef.com - CHEFTMA, editorial
 codechef.com - STICKS, editorial
 spoj.com - BAISED
 spoj.com - BALIFE
 spoj.com - GCJ101BB
 codechef.com - FGFS
 codechef.com - KNPSK
 codechef.com - LEMUSIC
 codechef.com - ARRANGE
 codechef.com - FASHION
 Dynamic programming (Basic DP)
o Resources
 medium.freecodecamp.org - Demystifying Dynamic Programming
 iarcs.org.in - Dynamic Programming - Tiling
 topcoder.com - Dynamic Programming – From Novice to Advanced
 illinois.edu - Dynamic Programming ;(Exercises are recommended)
 codechef.com - Dynamic Programming
 geeksforgeeks.org - Dynamic Programming ;(Contains a lot of practice
sessions)
o Practice Problems
 codechef.com - ALTARAY, editorial
 codechef.com - DELISH, editorial
 codechef.com - DBOY, editorial
 codechef.com - XORSUB, editorial
 codechef.com - GRID, editorial
 codechef.com - TADELIVE, editorial
 codechef.com - FROGV, editorial
 codechef.com - MATRIX2, editorial
 codechef.com - AMSGAME2, editorial
 spoj.com - MDOLLS
 spoj.com - MSTICK
 spoj.com - MCARDS
 spoj.com - MIXTURES
 spoj.com - SAMER08D
 spoj.com - AIBOHP
 Naive string searching
o Resources
 geeksforgeeks.org - Naive Pattern Searching
 Sorting
o khanacademy.org
o visualgo.net
o iarcs.org.in
o Merge sort
 youtube.com - Merge sort algorithm
 Practice Problems
codechef.com -MRGSRT
o Quick sort
 youtube.com - Quicksort algorithm
 Practice Problems
codechef.com -TSORT
o Counting sort
 geeksforgeeks.org - Counting Sort
 Practice Problems
 codechef.com - TACHSTCK, editorial
 codechef.com - STICKS, editorial
 Binary Search
o Resources
 topcoder.com (Try solving problems of Simple and Moderate level as
mentioned in the end of the link)
 codechef.com
 usfca.edu
 khanacademy.org
o Detailed Theoretical analysis
 cmu.edu (A theoretical analysis)
o Problems
 geeksforgeeks.org - Binary Search (Contains some solved problems)
 codechef.com - STRSUB, editorial
 codechef.com - ASHIGIFT, editorial
 codechef.com - STACKS, editorial
 codechef.com - DIVSET, editorial
 codechef.com - LOWSUM, editorial
 codechef.com - SNTEMPLE, editorial
 codechef.com - SNAKEEAT, editorial
 codechef.com - SCHEDULE, editorial
 codechef.com - RIGHTTRI, editorial
 codechef.com - FORESTGA, editorial
 codechef.com - CHEFHCK2,editorial
 spoj.com - ABCDEF
 spoj.com - NOTATRI
 spoj.com - SCALE
 spoj.com - SUMFOUR
 spoj.com - SUBSUMS
 spoj.com - ANARC05B
 spoj.com - RENT
 spoj.com - PIE
 spoj.com - MKUHAR
 spoj.com - SVADA
 spoj.com - SUBS

Mock Test:
 Test 1 - codechef.com/FLMOCK01
 Test 2 - codechef.com/FLMOCK02
 Test 3 - codechef.com/FLMOCK03
 Test 4 - codechef.com/FLMOCK04

Advanced
This level is intended to test that the candidate has a very good grasp of algorithms and data
structures, and can solve most problems that arise in practice. Candidates can expect
problems from the following topics to come in the exam.

Syllabus:
Everything in the Foundation Level, along with:

 Heaps (priority queue)


 Disjoint Set Union
 Segment Trees
 Binary Index Tree (Fenwick tree)
 Trees (traversals, tree dynamic programming)
 Finding Lowest Common Ancestors (O(log N) solution where N is number of nodes).
 Graph Algorithms:
o Finding connected components and transitive closures.
o Shortest-path algorithms (Dijkstra, Bellman-Ford, Floyd-Warshall)
o Minimum spanning tree (Prim and Kruskal algorithms)
o Biconnectivity in undirected graphs (bridges, articulation points)
o Strongly connected components in directed graphs
o Topological Sorting
o Euler path, tour/cycle.
 Modular arithmetic including division, inverse
 Amortized Analysis
 Divide and Conquer
 Advanced Dynamic Programming problems (excluding the dp optimizations which
are added in expert level)
 Sieve of Eratosthenes

Learning Resources:
 Heaps (priority queue)
o Resources
 cs.cmu.edu
 eecs.wsu.edu
 geeksforgeeks.org
 visualgo.net
 iarcs.org.in
o Practice Problems
 codechef.com - IPCTRAIN, editorial
 codechef.com - ANUMLA, editorial
 codechef.com - KSUBSUM, editorial
 codechef.com - RRATING, editorial
 codechef.com - TSECJ05, editorial
 spoj.com - WEIRDFN
 codechef.com - CAPIMOVE, editorial
 spoj.com - RMID2
 spoj.com - LAZYPROG
 spoj.com - EXPEDI
 acm.timus.ru
 baylor.edu - Maze Checking and Visualization
 codechef.com - MOSTDIST, editorial
 Disjoint Set Union
o Resources
 topcoder.com
 harvard.edu
 ucdavis.edu
 visualgo.net
o Practice Problems
 codechef.com - GALACTIK, editorial
 codechef.com - DISHOWN, editorial
 codechef.com - JABO, editorial
 codechef.com - PARITREE, editorial
 codechef.com - FILLMTR, editorial
 B. Mike and Feet
 D. Quantity of Strings
 codechef.com - SETELE, editorial
 codechef.com - MAZE, editorial
 codechef.com - MAGICSTR, editorial
 codechef.com - MTRWY, editorial
 codechef.com - BIGOF01, editorial
 codechef.com - FIRESC, editorial
 Segment Trees
o Resources
 wcipeg.com
 topcoder.com
 kartikkukreja.wordpress.com
 visualgo.net
 iarcs.org.in
o Practice Problems
 spoj.com - GSS1
 spoj.com - GSS2
 codeforces.com - Classic Segment Tree (Expert Level)
 spoj.com - IOPC1207
 spoj.com - ORDERSET
 spoj.com - HELPR2D2
 spoj.com - ANDROUND
 spoj.com - HEAPULM
 spoj.com - NICEDAY
 spoj.com - YODANESS
 spoj.com - DQUERY
 spoj.com - KQUERY
 spoj.com - FREQUENT
 spoj.com - GSS3
 spoj.com - GSS4
 spoj.com - GSS5
 spoj.com - KGSS
 spoj.com - HELPR2D2
 spoj.com - BRCKTS
 spoj.com - CTRICK
 spoj.com - MATSUM
 spoj.com - RATING
 spoj.com - RRSCHED
 spoj.com - SUPPER
 spoj.com - ORDERS
 codechef.com - LEBOBBLE
 codechef.com - QUERY
 spoj.com - TEMPLEQ
 spoj.com - DISUBSTR
 spoj.com - QTREE
 spoj.com - QTREE2
 spoj.com - QTREE3
 spoj.com - QTREE4
 spoj.com - QTREE5
o Problems on segment tree with lazy propagation
 spoj.com - HORRIBLE (must do basic lazy propagation problem)
 spoj.com - LITE (a nice lazy propagation problem)
 spoj.com - MULTQ3 (another nice lazy propagation problem)
 codechef.com - CHEFD
 codechef.com - FUNAGP (a difficult lazy propagation problem.)
 RPAR (a difficult and nice lazy propagation)
 codechef.com - ADDMUL
 spoj.com - SEGSQRSS (a difficult lazy propagation problem)
 spoj.com - KGSS
 codeforces.com - C. Circular RMQ
 codeforces.com - E. Lucky Queries (must do hard problem on lazy
propagation)
 codeforces.com - E. A Simple Task
 codeforces.com - C. DZY Loves Fibonacci Numbers (important
problem to do, introduces some nice properties over lazy propagation)
 codeforces.com - D. The Child and Sequence
 codeforces.com - E. Lucky Array
 Binary Index Tree (Fenwick tree)
o Resources
 topcoder.com
 iarcs.org.in
 visualgo.net
o 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 peformed on binary indexed tree
(http://petr-mitrichev.blogspot.in/2013/05/fenwick-tree-range-updates.html).
Note that range updates on BIT is not a part of the syllabus.
 spoj.com - INVCNT
 spoj.com - TRIPINV
 Trees (traversals)
o Resources
 slideshare.net
 iarcs.org.in
 berkeley.edu
o Practice Problems
 spoj.com - TREEORD
 Finding Lowest Common Ancestors (O(log N) solution where N is number of
nodes)
o Resources
 topcoder.com
 Depth First Search, Breadth First Search (Finding connected components and
transitive closures)
o Resources
 geeksforgeeks.org - Connected Components in an undirected graph
 geeksforgeeks.org - Transitive closure of a graph
 geeksforgeeks.org - Depth First Traversal or DFS for a Graph
 iarcs.org.in - Basic Graph Algorithms
 visualgo.net - Graph Traversal
 harvard.edu - Breadth-First Search
o Practice Problems
 codechef.com - FIRESC, editorial
 spoj.com - BUGLIFE
 spoj.com - CAM5
 spoj.com - GCPC11J
 spoj.com - KFSTB
 spoj.com - PT07Y
 spoj.com - PT07Z
 spoj.com - LABYR1
 spoj.com - PARADOX
 spoj.com - PPATH ;(must do bfs problem)
 spoj.com - ELEVTRBL (bfs)
 spoj.com - QUEEN (bfs)
 spoj.com - SSORT ;(cycles in a graph)
 spoj.com - ROBOTGRI ;(bfs)
 Shortest-path algorithms (Dijkstra, Bellman-Ford, Floyd-Warshall)
o Resources
 geeksforgeeks.org - Dijkstra’s shortest path algorithm
 Iarcs.org.in - Shortest paths
 Visualgo.net - Single-Source Shortest Paths (SSSP)
o Practice Problems
 codechef.com - DIGJUMP, editorial
 codechef.com - AMR14B, editorial
 codechef.com - INSQ15_F, editorial
 codechef.com - SPSHORT, editorial (slightly difficult dijkstra's
problem.)
 codechef.com - RIVPILE, editorial
 spoj.com - SHPATH
 spoj.com - TRAFFICN
 spoj.com - SAMER08A
 spoj.com - MICEMAZE
 spoj.com - TRVCOST
 codechef.com - PAIRCLST, editorial
 Bellman Ford Algorithm
o Resources
 geeksforgeeks.org - Dynamic Programming - Bellman–Ford Algorithm
 compprog.wordpress.com - ;One Source Shortest Path - Bellman-Ford
Algorithm
o Practice Problem
 community.topcoder.com - PeopleYouMayKnow
 codeforces.com - D. Robot Control
 spoj.com - ARBITRAG - Arbitrage ;(Floyd Warshall)
 community.topcoder.com - NetworkSecurity ;(Floyd Warshall)
 Minimum spanning tree (Prim and Kruskal algorithms)
o Resources
 algs4.cs.princeton.edu - Minimum Spanning Trees
 iarcs.org.in - Spanning trees
 visualgo.net - Spanning Tree
o Practice Problem
 spoj.com - MST
 spoj.com - NITTROAD
 spoj.com - BLINNET
 spoj.com - CSTREET
 spoj.com - HIGHWAYS
 spoj.com - IITWPC4I
 codechef.com - MSTQS, editorial
 codechef.com - CHEFGAME, editorial
 codechef.com - GALACTIK, editorial
 codechef.com - GOOGOL03, editorial
 spoj.com - KOICOST
 Biconnectivity in undirected graphs (bridges, articulation points)
o Resources
 e-maxx-eng.appspot.com - Finding Bridges in a Graph
 iarcs.org.in - Articulation Points
 pisces.ck.tp.edu.tw - Articulation Points
o Practice Problem
 uva.onlinejudge.org - Network
 icpcarchive.ecs.baylor.edu - Building Bridges
 uva.onlinejudge.org - Tourist Guide
 acm.tju.edu.cn - Network
 spoj.com - EC_P - Critical Edges
 spoj.com - SUBMERGE - Submerging Islands
 spoj.com - POLQUERY - Police Query
 codeforces.com - A. Cutting Figure
 Strongly connected components in directed graphs
o Resources
 iarcs.org.in - Strongly connected components
 theory.stanford.edu - Strongly Connected Components
o Practice Problem
 spoj.com - ANTTT
 spoj.com - CAPCITY
 spoj.com - SUBMERGE
 codechef.com - MCO16405, editorial
 spoj.com - BOTTOM
 spoj.com - BREAK
 community.topcoder.com - Marble Collection Game
 Topological Sorting
o Resources
 geeksforgeeks.org - Topological Sorting
o Practice Problem
 spoj.com - TOPOSORT ;
 codeforces.com - C. Fox And Names ;
 codechef.com - RRDAG, editorial
 spoj.com - RPLA
 codechef.com - CL16BF (topological sort with dp), editorial
 spoj.com - MAKETREE
 Euler path, tour/cycle.
o Resources
 math.ku.edu - Euler Paths and Euler Circuits
o Practice Problem
 spoj.com - WORDS1
 codechef.com - CHEFPASS, editorial
 codechef.com - TOURISTS, editorial
 codeforces.com - D. New Year Santa Network
 B. Strongly Connected City
 codechef.com - PEOPLOVE
 codeforces.com - D. Tanya and Password
 codeforces.com - E. One-Way Reform
 spoj.com - GCPC11C
 spoj.com - MAKETREE
 Modular arithmetic including division, inverse
o Resources
 codechef.com - Fast Modulo Multiplication (Exponential Squaring)
 codechef.com - Best known algos for calculating nCr % M ;(only for
expert level)
 Amortized Analysis
o Resources
 ocw.mit.edu - Amortized Analysis
 wikipedia.org - Amortized Analysis
 iiitdm.ac.in - Amortized Analysis
 Divide and Conquer
o Resources
 cs.cmu.edu - Divide-and-Conquer and Recurrences
 geeksforgeeks.org - Divide-and-Conquer
o Practice Problem
 codechef.com - MRGSRT, editorial
 spoj.com - HISTOGRA
 codechef.com - TASTYD, editorial
 codechef.com - RESTPERM, editorial
 codechef.com - ACM14KP1, editorial
 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.)
o Resources
 apps.topcoder.com - Commonly used DP state domains
 apps.topcoder.com - Introducing Dynamic Programming
 apps.topcoder.com - Optimizing DP solution
 codeforces.com - DP over Subsets and Paths
o Problems for Advanced DP
 spoj.com - HIST2 ;(dp bitmask)
 spoj.com - LAZYCOWS ;(dp bitmask)
 spoj.com - TRSTAGE ;(dp bitmask)
 spoj.com - MARTIAN
 spoj.com - SQRBR
 spoj.com - ACMAKER
 spoj.com - AEROLITE
 spoj.com - BACKPACK
 spoj.com - COURIER
 spoj.com - DP
 spoj.com - EDIST
 spoj.com - KRECT
 spoj.com - GNY07H
 spoj.com - LISA
 spoj.com - MINUS
 spoj.com - NAJKRACI
 spoj.com - PHIDIAS
 spoj.com - PIGBANK
 spoj.com - PT07X
 spoj.com - VOCV
 spoj.com - TOURIST
 spoj.com - MKBUDGET
 spoj.com - MMAXPER
 spoj.com - ANARC07G
 spoj.com - MENU
 spoj.com - RENT ;(dp with segment tree/BIT)
 spoj.com - INCSEQ ;(dp with segment tree/BIT)
 spoj.com - INCDSEQ ;(dp with segment tree/BIT)
 You can solve some advanced problems from
 codeforces.com - Dynamic Programming Type
 Sieve of Eratosthenes
o Resources:
 codechef.com - Sieve Methods
o Practice Problems
 spoj.com - TDKPRIME
 spoj.com - TDPRIMES
 spoj.com - ODDDIV ;(sieve + binary search)
 spoj.com - NDIVPHI ;O(N) prime testing algorithm)
 spoj.com - DIV ;(divisor sieve)
 codechef.com - LEVY, editorial
 codechef.com - PRETNUM, editorial
 codechef.com - KPRIME, editorial
 codechef.com - DIVMAC, editorial (segment tree with sieve)
 codechef.com - PPERM, editorial ;(a bit advanced sieve application)

Mock Test:
 Test 1 - codechef.com/ALMOCK01
 Test 2 - codechef.com/ALMOCK02
 Test 3 - codechef.com/ALMOCK03
 Test 4 - codechef.com/ALMOCK04

Expert

This level is intended to test that the candidate is an expert in algorithms and data structures,
and has a deep understanding of the topics. Candidates can expect problems from the
following topics to come in the exam.

Syllabus:
The syllabus for Expert Level is open-ended. Everything in Advanced Level will be included,
along with:

 Treaps
 Persistent Data Structures
 HLD
 Centroid Decomposition
 Computational Geometry
 Fast Fourier Transforms
 Game Theory
 Gaussian Elimination
 Dynamic Programming Optimizations
 Advanced String algorithms (Tries, KMP, Aho-Corasik, Suffix arrays, Suffix trees)
 Flows (Max-Flow, Min Cost Max Flow)

You might also like