https://github.com/rain1024/datastructures-algorithms-competitive-programming
<Hello!> -|DaS.Algo|- +Pr0bl3m5! `Comp::Ete` {Solve~Fun} ^Join_us^
https://github.com/rain1024/datastructures-algorithms-competitive-programming
advent-of-code advent-of-code-2022 algorithm algorithms codeforces competitive-programming data-structures data-structures-and-algorithms leetcode
Last synced: 2 months ago
JSON representation
<Hello!> -|DaS.Algo|- +Pr0bl3m5! `Comp::Ete` {Solve~Fun} ^Join_us^
- Host: GitHub
- URL: https://github.com/rain1024/datastructures-algorithms-competitive-programming
- Owner: rain1024
- Created: 2022-11-11T11:45:53.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2025-01-31T02:01:00.000Z (9 months ago)
- Last Synced: 2025-04-26T13:41:07.384Z (6 months ago)
- Topics: advent-of-code, advent-of-code-2022, algorithm, algorithms, codeforces, competitive-programming, data-structures, data-structures-and-algorithms, leetcode
- Language: C++
- Homepage:
- Size: 2.58 MB
- Stars: 12
- Watchers: 2
- Forks: 4
- Open Issues: 21
-
Metadata Files:
- Readme: README.md
- Changelog: HISTORY.md
Awesome Lists containing this project
README
Data Structures & Algorithms
Competitive Programming
```
-|DaS.Algo|-
+Pr0bl3m5!
`Comp::Ete`
{Solve~Fun}
^Join_us^
```
---
Programming Languages:
Python,
C++,
Java,
Typescript
---
⭐ [New Version 1.3.0 is released.](https://github.com/rain1024/datastructures-algorithms-competitive-programming/releases)
## ⚛ Introduction
-
Introduction to Data Structures and Algorithms -
Introduction to Competitive Programming -
Choosing a Programming Language
## 📑 Data Structures
A data structure is a data organization, management, and storage format that is usually chosen for efficient access to data. More recisely, a data structure is a collection of data values, the relationships among them, and the functions or operations that can be applied to the data.
B - Basic, A - Advanced
-
B
Array -
B
String -
B
Linked List -
B
Stack -
B
Queue -
B
Set -
B
Hash Table -
BHeap -
BPriority Queuecpp🐀 -
A
Tree-
A
Binary Search Tree -
AAVL Tree -
ARed-Black Tree -
ASegment Tree -
AFenwick Tree
-
-
A
Graph -
APrefix sum (Range queries)cpp🐀py🐍 -
ADisjoin Set -
ABloom Filter -
ALRU Cache -
ASkiplistcpp🐀
## 👾 Algorithms
An algorithm is a finite sequence of rigorous instructions, typically used to solve a class of specific problems or to perform a computation.
B - Basic, A - Advanced
### 📦 Algorithms by Topic
-
Big-O -
Math-
BBit Manipulationcpp🐀py🐍 -
BBinary Floating Point -
BFactorial -
BFibonacci Number -
BPrime Factors -
BPrimality Test -
BEuclidean Algorithm -
BLeast Common Multiple -
BSieve of Eratosthenes -
BIs Power of Two -
BPascal's Triangle -
BComplex Number -
BRadian & Degree -
BFast Powering -
BHorner's method -
BMatrices -
BEuclidean Distance -
AInteger Partition -
ASquare Root -
ALiu Hui π Algorithm -
ADiscrete Fourier Transform
-
-
BCartesian Product -
BFisher–Yates Shuffle -
APower Set -
APermutations -
ACombinations -
ALongest Common Subsequence -
ALongest Increasing Subsequence -
AShortest Common Supersequence -
AKnapsack Problem -
AMaximum Subarray -
ACombination Sum -
Strings-
BHamming Distance -
BPalindrome -
ALevenshtein Distance -
AKnuth–Morris–Pratt Algorithm -
AZ Algorithm -
ARabin Karp Algorithm -
ALongest Common Substring -
ARegular Expression Matching
-
-
Searchespy🐍-
BLinear Search -
BJump Search -
BBinary Search -
BInterpolation Search
-
-
Sortingcpp🐀py🐍-
BBubble Sort -
BSelection Sort -
BInsertion Sort -
BHeap Sort -
BMerge Sort -
BQuicksort -
BShellsort -
BCounting Sort -
BRadix Sort
-
-
Two Pointers -
Linked Lists-
BStraight Traversal -
BReverse Traversal
-
-
Trees-
BDepth-First Search (DFS) -
BBreadth-First Search (BFS)
-
-
Graphs-
BDepth-First Search (DFS) -
BBreadth-First Search (BFS) -
BKruskal’s Algorithm -
ADijkstra Algorithm -
ABellman-Ford Algorithm -
AFloyd-Warshall Algorithm -
ADetect Cycle -
APrim’s Algorithm -
A
Topological Sorting -
AArticulation Points -
ABridges - DFS based algorithm -
AEulerian Path and Eulerian Circuit - Fleury's algorithm - Visit every edge exactly once -
AHamiltonian Cycle - Visit every vertex exactly once -
AStrongly Connected Components - Kosaraju's algorithm -
ATravelling Salesman Problem - shortest possible route that visits each city and returns to the origin city
-
-
Cryptography-
BPolynomial Hash - rolling hash function based on polynomial -
BRail Fence Cipher - a transposition cipher algorithm for encoding messages -
BCaesar Cipher - simple substitution cipher -
BHill Cipher - substitution cipher based on linear algebra
-
-
Machine Learning-
BNanoNeuron - 7 simple JS functions that illustrate how machines can actually learn (forward/backward propagation) -
Bk-NN - k-nearest neighbors classification algorithm -
Bk-Means - k-Means clustering algorithm
-
-
Image Processing-
BSeam Carving - content-aware image resizing algorithm
-
-
Statistics-
BWeighted Random - select the random item from the list based on items' weights
-
-
Evolutionary algorithms-
AGenetic algorithm - example of how the genetic algorithm may be applied for training the self-parking cars
-
-
Uncategorized-
BTower of Hanoi -
BSquare Matrix Rotation - in-place algorithm -
BJump Game - backtracking, dynamic programming (top-down + bottom-up) and greedy examples -
BUnique Paths - backtracking, dynamic programming and Pascal's Triangle based examples -
BRain Terraces - trapping rain water problem (dynamic programming and brute force versions) -
BRecursive Staircase - count the number of ways to reach to the top (4 solutions) -
BBest Time To Buy Sell Stocks - divide and conquer and one-pass examples -
AN-Queens Problem -
AKnight's Tour
-
Sets
### 💠 Algorithms by Paradigm
-
Brute Force - look at all the possibilities and selects the best solutioncpp🐀py🐍-
BLinear Search -
BRain Terraces - trapping rain water problem -
BRecursive Staircase - count the number of ways to reach to the top -
AMaximum Subarray -
ATravelling Salesman Problem - shortest possible route that visits each city and returns to the origin city -
ADiscrete Fourier Transform - decompose a function of time (a signal) into the frequencies that make it up
-
-
Greedy - make the locally optimal choice at each stage with the hope of finding a global optimumpy🐍-
BJump Game -
AUnbound Knapsack Problem -
ADijkstra Algorithm - finding the shortest path to all graph vertices -
APrim’s Algorithm - finding Minimum Spanning Tree (MST) for weighted undirected graph -
AKruskal’s Algorithm - finding Minimum Spanning Tree (MST) for weighted undirected graph
-
-
Divide and Conquer - divide the problem into a number of subproblems that are smaller instances of the same problem-
BBinary Search -
BTower of Hanoi -
BPascal's Triangle -
BEuclidean Algorithm - calculate the Greatest Common Divisor (GCD) -
BMerge Sort -
BQuicksort -
BTree Depth-First Search (DFS) -
BGraph Depth-First Search (DFS) -
BMatrices - generating and traversing the matrices of different shapes -
BJump Game -
BFast Powering -
BBest Time To Buy Sell Stocks - divide and conquer and one-pass examples -
APermutations (with and without repetitions) -
ACombinations (with and without repetitions) -
AMaximum Subarray
-
-
Dynamic Programming - break the problem into subproblems and store the results of subproblems to avoid computing the same results again
(basic:cpp🐀, intermidate:cpp🐀)-
BFibonacci Number -
BJump Game -
BUnique Paths -
BRain Terraces - trapping rain water problem -
BRecursive Staircase - count the number of ways to reach to the top -
BSeam Carving - content-aware image resizing algorithm -
ALevenshtein Distance - minimum edit distance between two sequences -
ALongest Common Subsequence (LCS) -
ALongest Common Substring -
ALongest Increasing Subsequence -
AShortest Common Supersequence -
A0/1 Knapsack Problem -
AInteger Partition -
AMaximum Subarray -
ABellman-Ford Algorithm - finding the shortest path to all graph vertices -
AFloyd-Warshall Algorithm - find the shortest paths between all pairs of vertices -
ARegular Expression Matching
-
-
Backtracking - similarly to brute force, try to generate all possible solutions, but each time you generate next solution you test if it satisfies all conditions, and only then continue generating subsequent solutions. Otherwise, backtrack, and go on a different path of finding a solution. Normally the DFS traversal of state-space is being used.-
BJump Game -
BUnique Paths -
BPower Set - all subsets of a set -
AHamiltonian Cycle - Visit every vertex exactly once -
AN-Queens Problem -
AKnight's Tour -
ACombination Sum - find all combinations that form specific sum
-
-
Branch & Bound remember the lowest-cost solution found at each stage of the backtracking search, and use the cost of the lowest-cost solution found so far as a lower bound on the cost of a least-cost solution to the problem, in order to discard partial solutions with costs larger than the lowest-cost solution found so far. Normally BFS traversal in combination with DFS traversal of state-space tree is being used.
## 🔆 Collections
**Competitive Programming Events**
* 🎄 Advent of Code ([2015](collections/advent-of-code/2015/), [2022](collections/advent-of-code/2022/))
* 🔰 Google Code Jam ([2022](collections/codejam-2022/))
**Coding Problems Website**
* [🔸 LeetCode](collections/leetcode/)
* [🔸 Codeforces](collections/codeforces/)
**Courses & Specialization**
* [🍨 Data Structures and Algorithms Specialization](collections/datastructures-and-algorithms-specialization/), University of California San Diego
## Contributors
This project exists thanks to all the people who contributed.