This repo has my attempts at different contest problems in an attempt to learn foundational data structures and algorithms in Computer Science.
It is structured by data structures and algorithms at the top level, then a canonical implementation of each data structure for contests [Needs more plumbing/software engineering for resilience before using it directly in software applications] and a few sample problems from online ICPC style problem sites [hackerearth, UVA, SPOJ] for each of them.
- Heaps / Priority Queues
- Disjoint Sets
- Segment Trees
- Range Minimum Query / Lowest Common Ancestor
- Binary Indexed Trees / Fenwick Trees
- Tries
- Interval Trees
- Divide and Conquer
- Backtracking
- Binary Search Trees [AVL, Red black trees]
- Maximum Value Contiguous Subsequence
- Making Change
- Longest Increasing Subsequence
- Box Stacking
- Building Bridges
- Integer Knapsack Problem
- Balanced Partition
- Edit Distance
- Counting Boolean Parenthesizations
- Optimal Strategy for a Game
- Basics + Implementation [Adjacently List, Edge List, etc.]
- BFS + DFS + Floodfill
- Dijkstra + Bellman Ford (A* star)
- Strongly Connected Components
- Topological Sorting
- Minimum Spanning Trees - Prim + Kruskal