Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Algos Study Material :

1 ) Language

2 ) Basic Math theory and problems

3 ) C++ STL

4 ) Combinatorics and probability

5 ) Recursion and Divide and Conquer

6 ) Sorting and searching

7 ) Dynamic programing

8 ) Range Query

9 ) String Algos

10 ) Tree

11 ) Graphs

12 ) Geometry

<=======================================================================>

Language :

We do not have any preference over a language but we suggest you to choose C++ as it is used
by most of the competitive programers and it has a very vast Standard Template Library ( STL )

That reduce the work many folds.

For most of languages you can easily found the courses on YouTube ranging from 4 - 10 hours.

For c++ You can watch

https://youtu.be/vLnPwxZdW4Y

And you never learn something really if you haven’t practiced it.

So Practice easy type question from

https://www.hackerrank.com/domains/cpp

Feel free to try some medium type as well.

There are questions for every language on hacker rank. Do as per your choice.

It will be enough for now.

<=======================================================================>

Basic Math theory and problems :


Here some of links have problems below them, do try .

1 ) modulo arithmetic :

https://en.wikipedia.org/wiki/Modulo_operation

2 ) Read the following articles from algebra section cp-algorithm : http://cp-algorithms.com

- Binary Exponentiation

- Euclidean algorithm for computing the greatest common divisor

- Extended Euclidean Algorithm

- Linear Diophantine Equations

- Fibonacci Numbers

- Sieve of Eratosthenes

- Euler's totient function

- Number of divisors / sum of divisors

- Modular Inverse

- Linear Congruence Equation

- Chinese Remainder Theorem

- Factorial modulo

Practice on https://cses. /problemset/ from Introductory and Mathematics section

<=======================================================================>

C++ STL :
Watch the playlist :

https://www.youtube.com/watch?v=LyGlTmaWEPs&list=PLk6CEY9XxSIA-
xo3HRYC3M0Aitzdut7AA

Practice stl questions from hackerrank.

<=======================================================================>

Combinatorics and probability :


1 ) Read https://www.topcoder.com/thrive/articles/Basics%20of%20Combinatorics

2 ) Read all articles from Combinatorics section cp-algorithm : http://cp-algorithms.com

3 ) https://www.youtube.com/watch?v=le2enQgQ7Ws

4 ) Expected values :

https://codeforces.com/blog/entry/62690

https://codeforces.com/blog/entry/62792

<=======================================================================>

Recursion and Divide and Conquer


1) https://youtu.be/2Rr2tW9zvRg

2) Read https://www.geeksforgeeks.org/recursion/

3) And https://www.geeksforgeeks.org/divide-and-conquer/

Practice some of problems from above links as well.

<=====================================================================>

Sorting and searching


Read about insertion sort, bubble sort, quick sort, merge sort algorithms. And do try to code on
your own, just by reading the algorithm, without seeing the actual code.

fi
Binary Search :

https://www.youtube.com/watch?v=GU7DpgHINWQ

read about lower_bound , upper_bound

Read : https://leetcode.com/problems/median-of-two-sorted-arrays/discuss/2481/Share-
my-O(log(min(mn)))-solution-with-explanation

And https://www.youtube.com/watch?v=S9oUiVYEq7E

Practice rst 10 question from sorting and searching section from https://cses. /
problemset/

For more applications watch and practice https://codeforces.com/edu/course/2

binary search from codeforces edu course.

<================================================================>

Dynamic programing :
Watch

https://www.youtube.com/watch?v=YBSt1jYwVfU&list=PLl0KD3g-
oDOGJUdmhFk19LaPgrfmAGQfo

Practice rst 10 question from https://atcoder.jp/contests/dp/tasks

For editorials you can watch https://www.youtube.com/watch?v=FAQxdm0bTaw or read


other’s solution.

<===============================================================>

Range Query :
Read Segment Tree , Fenwick Tree .

For Fenwick tree watch : https://www.youtube.com/watch?v=kPaJfAUwViY

Practice problems from above links and do rst 9 question from Range Queries section from
https://cses. /problemset/

For more about segment tree : practice on https://codeforces.com/edu/course/2

<===================================================================>

fi
fi
fi
fi
fi
String Algos :
Read the articles String Processing section on cp-algorithm : http://cp-algorithms.com

- String Hashing

- Rabin-Karp for String Matching

- Pre x function - Knuth-Morris-Pratt

- Z-function

Read https://www.geeksforgeeks.org/trie-insert-and-search/

Practice on problems in links and do rst 4-5 problems on https://cses. /problemset/ String
Algorithms.

<=====================================================================>

Graph Algorithm :
Here is a playlist for theory : https://www.youtube.com/list=PLDV1Zeh2NRsDGO4--
qE8yH72HFL1Km93P

And https://www.youtube.com/watch?
v=VW85xQ6GJP4&list=PL2q4fbVm1Ik6DCzm9XZJbNwyHtHGclcEh

For basics read following topics : from http://cp-algorithms.com

- Breadth First Search

- Depth First Search

- Distances :

- 0-1 BFS

- Dijkstra - nding shortest paths from given vertex

- Bellman-Ford - nding shortest paths with negative weights

- Floyd-Warshall - nding all shortest paths

- Topological Sorting

- Finding Connected Components

Also - Disjoint Set Union

- Minimum Spanning Tree - Prim's Algorithm

- Minimum Spanning Tree - Kruskal

Practice on Graph Algorithms section of https://cses. /problemset/ , As much as you can.

<====================================================================>

Tree :
Check out the problems on trees on https://cses. /problemset/ and do only the problems that are

explained in https://codeforces.com/blog/entry/79857 .

<====================================================================>

fi
fi
fi
fi
fi
fi
fi
fi
Geometry :
Read on http://cp-algorithms.com .

And try to do problems on Geometry section of https://cses. /problemset/

You can watch https://www.youtube.com/watch?v=G9QTjWtK_TQ for editorials.

<====================================================================>

Misc :
For various other topics you can follow

https://usaco.guide/general/using-this-guide?lang=cpp

This has tutorials on various topics.

Read this handbook : https://cses. /book/book.pdf

fi
fi

You might also like