I started competitive programming with C/C++ at the age of 15, beginning with basic programming fundamentals. Later, I developed a strong interest in Data Structures and Algorithms, which led me to create this repository to share my code with others who are interested in competitive programming. Feel free to point out any mistakes or suggest improvements!
Note: My code contains many custom #define macros for faster coding. To make my code more readable and understandable, please use ALTHEA - a tool that helps convert competitive programming code into more readable format.
- STL Containers
- Vector, Queue, Stack
- Set, Map, Priority Queue
- Advanced Structures
- Disjoint Set Union (DSU)
- Binary Search Trees
- Heaps
- Trie
- Range Minimum Query (RMQ)
- Monotonic Stack/Queue
- Dynamic Programming (DP)
- Classic problems (knapsack, coin change, LIS)
- Grid-based DP
- State compression DP
- Tree DP
- Graph Algorithms
- BFS/DFS traversal
- Shortest path algorithms (Dijkstra, Bellman-Ford)
- Minimum Spanning Tree (Kruskal, Prim)
- Strongly Connected Components
- Cycle detection
- Tree Algorithms
- Tree traversal and diameter
- Lowest Common Ancestor (LCA)
- Tree matching
- Tree distances
- Binary Search
- Standard binary search
- Binary search on answer
- Lower/upper bound implementations
- Greedy Algorithms
- Divide and Conquer
- Closest pair of points
- Merge sort variations
- Sorting and Searching
- Range Queries
- String Algorithms
- Mathematical Problems
- Interactive Problems
- State Space Search
- Camp_1_65/, Camp_1_66/, Camp_1_67/ - Basic training materials
- Camp_2/ - Intermediate level with organized topics:
DP/- Dynamic programming problemsGraph/- Graph algorithms and problemsTree/- Tree data structures and algorithmsDSU/- Disjoint Set Union implementationsSTL/- Standard Template Library implementationsString_Algorithm/- String algorithmsMath/- Mathematical problemsGreedy/- Greedy algorithm problemsHeap/- Priority queue and heap problemsSweep_Line/- Sweep line algorithm problemsState_Space_Search/- State Space Search problems
- Camp_3/ - Advanced topics:
Coordinate_Compression/- Coordinate compression techniquesRMQ/- Range Minimum Query implementationsTrie/- Trie problemsShortest_Path_With_State/- Extra State Shortest Path problems
- Contest/ - Contest problems by year (2021-2024)
- TOI/` - Thailand Olympiad in Informatics problems
- IOI/` - International Olympiad in Informatics problems
- JOI/` - Japanese Olympiad in Informatics problems
- TUMSO/ - TUMSO (2018-2021)
- TUSCO/ - TUSCO (2022-2024)
- CodeCube/ - CodeCube contest problems
- CodeAlgo/ - CodeAlgo contest problems
- Crack_n_Code/ - Crack n Code contest problems
- Junior_Dev/ - Junior Dev contests
- Gean_Dev/ - Gean Dev contests
- Pre_TOI/ - Pre-TOI contest problems
- TPCPC/ - TPCPC contest problems
- SYPH/ - SYPH contest problems
- Skgrader/ - Skgrader contest problems
- Cses/ - CSES Problem Set organized by topics:
Introductory_Problems/- Basic problemsDynamic_Programming/- DP problemsGraph_Algorithms/- Graph theory problemsTree_Algorithms/- Tree problemsSorting_and_Searching/- Sorting and searching problemsRange_Queries/- Range query problemsAdditional_Problem/- Additional problems
- CodeForces/ - CodeForces contest problems organized by rounds
- AtCoder/ - AtCoder contest problems
- Leetcode/ - LeetCode problems
- Hackerrank/ - HackerRank problems
- SPOJ/ - Sphere Online Judge problems
- Programming/ - General programming problems
- dp/ - Dynamic programming templates
- Graph/ - Graph algorithm templates
- Bisearch/ - Binary search templates
- Pattern/ - Common coding patterns
- Prototype/ - Algorithm prototypes with documentation:
binary_search/- Binary search implementationclosest_pair/- Closest pair of pointscycle_finder/- Cycle detection algorithmsdsu/- Disjoint Set Unionfibonacci/- Fibonacci implementationsinversion_count/- Inversion countinglis/- Longest Increasing Subsequencelongest_path/- Longest path algorithmsmonotonic_stack/- Monotonic stack problemstsp/- Traveling Salesman Problem
- Cave/ - Interactive cave exploration problem
- Template.cpp - Main coding template
- Work.cpp - Working file
- wtf_sol.cpp - Solution file
- Choose a topic from the Knowledge Structure above
- Navigate to the appropriate folder in the Folder Structure
- Use ALTHEA to convert the code for better readability
- Practice and learn from the implementations
Feel free to:
- Report bugs or issues
- Suggest improvements to existing solutions
- Add new problems or algorithms
- Improve code documentation
- ALTHEA - Code readability tool
- CSES Problem Set
- CodeForces
- AtCoder
- LeetCode
This repository serves as both a learning resource and a personal collection of competitive programming solutions. Happy coding!