A bunch of commonly used algorithms and hacks to make a programmer's life easier. The algorithms were mostly developed by JeanCHilger, Junior-16 and PauloGSC.
- Sieve of Eratosthenes
- Fenwick Tree
- Segment Tree with Lazy
- Union-Find Disjoint Set
- Minimum Spanning Tree
- Kuskal's Algorithm
Superficial description of the contents of this repository.
-
data-structures: Useful and ordinary data structures, most found anywhere else.
- trees: Trees data structures.
- avl: AVL balanced tree implementation using C language;
- bst: Binary Search Tree implementation using C language;
- red-black(not complete): Red-Black balanced tree implementation using C language;
- segment-tree: Segment Tree array-like implementation using C++ language;
- trees: Trees data structures.
-
dynamic-programming: Classical dynamic programming algorithms.
- coin.cpp: C++ implementation for the coin chttps://github.com/JeanCHilger/useful-algorithms/tree/master/data-structureshange problem;
- edit-distance.cpp: C++ implementation for the edit distance problem;
- kadane.cpp: C++ implementation for the Kadane's algorithm (max sum for a contiguous subarray);
- knapsack-bottom-up.cpp: C++ implementation for the knapsack problem, using the bottom-up approach;
- knapsack.cpp: C++ implementation for the knapsack problem, using the top-down approach;
- lis.cpp: C++ implementation for the Longest Increasing Subsequence problem;
- longest-palindromic-subsequence.cpp: C++ implementation for the Longest Palindromic Subsequence problem;
- longest-palindromic-substring.cpp: C++ implementation for the Longest Palindromic Substring problem;
- max-subarray-sum.cpp: C++ implementation for the maximun sum of a subarray problem;
- scs.cpp: C++ implementation for the Shortest Common Supersequence problem;
-
graphs: Classical algorithms on graphs.
- bfs.cpp: C++ implementation of the Breadth-First Search traversal;
- dfs.cpp: C++ implementation of the Depth-First Search traversal;
- dijkstra.cpp: C++ implementation of the Dijkstra's algorithm;
-
problem-solving: Problems solved by JeanCHilger, Junior-16 and PauloGSC, from misc sources.