Skip to content

Latest commit

History

2,273 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

A repository for all Algorithms





GitHub repo sizeGitHub repo file count

GitHub issuesGitHub pull requestsGitHubGitHub forksGitHub Repo stars


Tech Stacks





Programs we have been a part of

No.Program NameDurationDeployment
1.Hacktoberfest (2022)1st Oct 2022 - 31st Oct 2022Algorithm
2.Social Winter of Code (2023) 1st Jan 2023 - 15th Mar 2023Algorithm
3.Social Summer of Code (2023) 1st June 2023 - 31st July 2023Algorithm
4.Hacktoberfest (2023) 1st Oct 2023 - 31st Oct 2023Algorithm


Available Resources

  • The resources are categorized based on programming language. One folder for one programming language

    • Each folder has different subfolders. The subfolder represents the category algorithm belongs to
      • Each subfolder has different files. Filename represents the name of the algorithm

Arrays

No.Algorithm NameAvailable languages
1.Diagonal Print Algorithm in 2D ArrayC, C++, Java, Python
2.Fisher-Yates AlgorithmC, C++, Java, Python
3.Monotonic ArrayC, C++, Java, Python
4.Spiral Print MatrixC, C++, Java, Python

Artificial Intelligence

No.Algorithm NameAvailable languages
1.A* Search AlgorithmC, C++, Java, Python

Binary

No.Algorithm NameAvailable languages
1.Binary <-> Gray Code ConversionC, C++, Java, Python
2.Brian Kerningham's AlgorithmC, C++, Java, Python
3.Hamming CodeC, C++, Java, Python
4.Hamming Distance TheoremC, C++, Java, Python

Cryptography

No.Algorithm NameAvailable languages
1.Affine CipherC, C++, Java, Python
2.Caesar CipherC, C++, Java, Python
3.Columnar Transposition CipherC, C++, Java, Python
4.Diffie - Hellman AlgorithmPython
5.Elgamal CryptosystemC, C++, Java, Python
6.Hill CipherC, C++, Java, Python
7.Homophonic SubstitutionC, C++, Java, Python
8.Morse CodeC, C++, Java, Python
9.Playfair CipherC, C++, Java, Python
10.Railfence CipherC, C++, Java, Python
11.RSAC, C++, Java, Python
12.SHA - 256C, C++, Java, Python
13.Vernam CipherC, C++, Java, Python
14.Vignere CipherC++, Java, Python

Concurrent Programming

No.Algorithm NameAvailable languages
1.Peterson's AlgorithmC, C++, Java, Python

Data Compression

No.Algorithm NameAvailable languages
1.Burrows-Wheeler Transform AlgorithmC, C++, Java, Python
2.Huffman CodingC, C++, Java,Python
3.LZ78 CompressionC, C++, Java, Python

Deadlock Avoidance

No.Algorithm NameAvailable languages
1.Banker's AlgorithmC, C++, Java,Python

Deep Learning

No.Algorithm NameAvailable languages
1.Perceptron Learning - Boolean FunctionsPython

Divide and Conquer

No.Algorithm NameAvailable languages
1.Karatsuba AlgorithmC++, Java, Python
2.N-Queen's ProblemC, C++, Java, Python
3.Strassen's Matrix MultiplicationC, C++, Java, Python

Dynamic Programming

No.Algorithm NameAvailable languages
1.0/1 KnapsackC, C++, Java, Python
2.Coin change problemC, C++, Java, Python
3.Edit DistanceC, C++, Java, Python
4.Fibonacci NumberC, C++, Java, Python
5.Hierholzer AlgorithmC, C++, Java, Python
6.Longest Common SubsequenceC, C++, Java, Python
7.Matrix Chain MultiplicationC, C++, Java, Python
8.Minimum Jump AlgorithmC, C++, Java, Python
9.Minimum Sum Partition ProblemC, C++, Java, Python
10.Partition problemC++, Java
11.Shortest Common Supersequence ProblemC, C++, Java, Python
12.Travelling Salesman ProblemC, C++, Java, Python

Game Theory

No.Algorithm NameAvailable languages
1.Grundy's NumberC, C++, Java, Python

Graphics

No.Algorithm NameAvailable languages
1.Scanline AlgorithmC++, Python

Graphs

No.Algorithm NameAvailable languages
1.Bellman FordC++, Java
2.Breadth First Search(BFS)C, C++, Java, Python
3.Dial’s AlgorithmC, C++, Java, Python
4.DijkstraC, C++, Java, Python
5.Dinic's AlgorithmC++, Java, Python
6.Disjoint Set UnionC, C++, Java, Python
7.Edmonds-karp AlgorithmC, C++, Java, Python
8.Fleury's AlgorithmC, C++, Java, Python
9.Floyd WarshallC, C++, Java, Python
10.Ford-Fulkerson AlgorithmC, C++, Java, Python
11.Hamiltonian PathJava
12.Hopcroft-Karp AlgorithmC, C++, Java, Python
13.Kosaraju's AlgorithmC++, Java
14.Kruskal's AlgorithmC, C++, Java, Python
15.Multi Source Shortest PathC, C++, Java, Python
16.Multistage Graph (Shortest Path)C, C++, Java, Python
17.Prim's AlgorithmC, C++, Java, Python
18.Stoer Wagner AlgorithmC, C++, Java, Python
19.Tarjan AlgorithmC, C++, Java, Python

Greedy Algorithm

No.Algorithm NameAvailable languages
1.Activity SelectionC, C++, Java, Python
2.Egyptian FractionC, C++, Java, Python
3.Fractional KnapsackC, C++, Java, Python
4.Job SequencingC, C++, Java, Python
5.Merge Interval AlgorithmC, C++, Java, Python
6.Optimal Merge PatternC, C++, Java, Python

Hashing

No.Algorithm NameAvailable languages
1.Bloom-Filter AlgorithmC, C++, Java, Python
2.Cuckoo HashingC, C++, Java, Python

Image Processing

No.Algorithm NameAvailable languages
1.Canny Edge DetectionC, C++, Java, Python

Job Scheduling

No.Algorithm NameAvailable languages
1.First Come First ServeC, C++, Java, Python
2.Highest Response Ratio NextC, C++, Java, Python
3.Priority SchedulingC, C++, Java, Python
4.Round Robin SchedulingC, C++, Java, Python
5.Shortest Job FirstC, C++, Java, Python

Linked List

No.Algorithm NameAvailable languages
1.Addition of two Linked ListsC, C++, Java, Python
2.Circular Linked ListC, C++, Java, Python
3.Detect loop in a Linked ListC++
4.Doubly Linked ListC, C++, Java, Python
5.Intersection of two Linked ListsC, C++, Java, Python
6.Length of Linked ListC, C++, Java, Python
7.LRU Cache DesignC, C++, Java, Python
8.Merge Two Sorted Linked ListC, C++, Java, Python
9.Merge K Sorted Linked ListC, C++, Java, Python
10.Palindrome Linked ListC, C++, Java, Python
11.Reverse Linked ListC, C++, Java, Python
12.Reverse Linked List in a Group of KC, C++, Java, Python
13.Singly Linked ListC, C++, Java, Python
14.Sorting Linked ListC, C++, Java, Python

Machine Learning

No.Algorithm NameAvailable languages
1.Decision TreePython
2.Feed-Forward Neural NetworkC++
3.K-Means ClustersC, C++, Python
4.K-Nearest NeighboursC, C++, Java, Python
5.Linear RegressionC, C++, Java, Python
6.Logistic RegressionC, C++, Java, Python
7.Naive BayesC++, Python

Maths

No.Algorithm NameAvailable languages
1.Armstrong NumbersC, C++, Java, Python
2.Binary ExponentiationC, C++, Java, Python
3.Binomial TheoremC, C++, Java, Python
4.Bennett's FormulaC, C++, Java, Python
5.Bentley-Ottmann AlgorithmC, C++, Java, Python
6.Bisection AlgorithmC, C++, Java, Python
7.Chinese Remainder TheoremC, C++, Java, Python
8.Chudnovsky AlgorithmC, C++, Java, Python
9.Closures of RelationsC, C++, Java, Python
10.Congruency of TriangleC, C++, Java, Python
11.Decimal <-> Binary ConverterC, C++, Java, Python
12.Extended Euclidean AlgorithmC, C++, Java, Python
13.Euler's Totient FunctionC, C++, Java, Python
14.Factorial of NumberC, C++, Java, Python
15.FactorsC, C++, Java, Python
16.Frievald's AlgorithmC, C++, Java, Python
17.GCD & LCMC, C++, Java, Python
18.Heron's FormulaC, C++, Java, Python
19.Interquartile RangesC, C++, Java, Python
20.Josephus ProblemC, C++, Java, Python
21.Klee's AlgorithmC, C++, Java, Python
22.Lucas Lehmer SeriesC, C++, Java, Python
23.Luhn's AlgorithmC, C++, Java, Python
24.Manhattan DistanceC, C++, Java, Python
25.Modular ExponentiationC, C++, Java, Python
26.Pascal's TriangleC, C++, Java, Python
27.Perfect NumberC, C++, Java, Python
28.Power-set of ElementsC, C++, Java, Python
29.Prefix-Postfix-Infix InterconversionC++, Python
30.Prime NumberC, C++, Java, Python
31.Quickhull AlgorithmC ,C++, Java, Python
32.Reverse IntegerC, C++, Java, Python
33.Roman to Decimal converterC, C++, Java, Python
34.Russian Peasant AlgorithmC, C++, Java, Python
35.Shri Dharayacharya AlgorithmC, C++, Java, Python
36.Sieve Eratosthenes AlgorithmC, C++, Java,Python
37.Similar TrianglesC, C++, Java, Python
38.Strong NumberC, C++, Java, Python
39.Sudoku SolverC, C++, Java, Python
40.Zeller's AlgorithmC, C++, Java, Python

Memory Allocation

No.Algorithm NameAvailable languages
1.Best Fit AlgorithmC, C++, Java, Python
2.Next Fit AlgorithmC, C++, Java, Python
3.Worst Fit AlgorithmC, C++, Java, Python

Optimization

No.Algorithm NameAvailable languages
1.Ant Colony OptimizationPython
2.Genetic AlgorithmC++, Python
3.Gradient DescentPython
4.Grey Wolf OptimizationC, C++, Java, Python
5.Hill Climbing AlgorithmC, C++, Java, Python
6.Particle Swarm OptimizationC++, Python
7.Shuffled Frog Leaping AlgorithmC++, Python
8.Simulated AnnealingC++, Python

Pattern Matching

No.Algorithm NameAvailable languages
1.Aho-Corasick AlgorithmC, C++, Java, Python
2.Boyer Moore AlgorithmC, C++, Java, Python
3.KMP AlgorithmC, C++, Java, Python
4.Rabin KarpC, C++, Java, Python
5.Z - AlgorithmC, C++, Java, Python

Recursion

No.Algorithm NameAvailable languages
1.String PermutationC, C++, Java, Python
2.Tower of HanoiC, C++, Java, Python

Searching

No.Algorithm NameAvailable languages
1.Binary Search on 2D MatrixC,C++, Java, Python
2.Binary SearchC, C++, Java, Python
3.Exponential SearchC, C++, Java, Python
4.Fibonacci SearchC, C++, Java, Python
5.Interpolation SearchC, C++, Java, Python
6.Jump SearchC, C++, Java, Python
7.Linear SearchC, C++, Java, Python
8.Order Agnostic Binary SearchC, C++, Java, Python
9.Quick SelectC, C++, Java, Python
10.Sublist SearchC, C++, Java, Python
11.Ternary SearchC, C++, Java, Python

Sorting

No.Algorithm NameAvailable languages
1.3 Sum ProblemC, C++, Java, Python
2.Bead SortC, C++, Java, Python
3.Bidirectional Selection SortC, C++, Java, Python
4.Bingo SortC, C++, Java, Python
5.Bogo SortC, C++, Java, Python
6.Bubble SortC, C++, Java, Python
7.Bucket SortC, C++, Java, Python
8.Comb SortC, C++, Java, Python
9.Counting SortC, C++, Java,Python
10.Cyclic SortC, C++, Java, Python
11.Cocktail SortC, C++, Java, Python
12.Dutch National FlagC, C++, Java, Python
13.Gnome SortC, C++, Java, Python
14.Heap SortC, C++, Java, Python
15.Insertion SortC, C++, Java, Python
16.Intro SortC, C++, Java, Python
17.Merge SortC, C++, Java, Python
18.Odd-Even Sort / Brick SortC, C++, Java, Python
19.Pancake SortC, C++, Java, Python
20.Pigeon-Hole SortC, C++, Java, Python
21.Quick SortC, C++, Java, Python
22.Radix SortC, C++Java, Python
23.Randomized Quick SortC, C++, Java, Python
24.Selection SortC, C++, Java, Python
25.Shell SortC, C++, Java, Python
26.Stooge SortC, C++, Java, Python
27.Tim SortC, C++, Java, Python
28.Topological SortC++
29.Wave SortC++, Java, Python

Stacks

No.Algorithm NameAvailable languages
1.Max Area in HistogramC, C++, Java, Python
2.Next Greater ElementC, C++, Java, Python
3.Rain Water ProblemC, C++, Java, Python
4.Stack Using Priority QueueC, C++, Java, Python

Strings

No.Algorithm NameAvailable languages
1.Beautiful String AlgorithmC, C++, Java, Python
2.Camel Case AlgorithmC, C++, Java, Python
3.Manacher's AlgorithmC, C++, Java, Python

Sub-Arrays

No.Algorithm NameAvailable languages
1.Boyer-Moore Majority VotingC, C++, Java, Python
2.Kadane's AlgorithmC, C++, Java, Python
3.Shortest Unsorted Continuous Sub-ArraysC, C++, Java, Python

Trees

No.Algorithm NameAvailable languages
1.AO* TreeC++, Java, Python
2.AVL TreeC, C++, Java, Python
3.B+ TreeC, C++, Java, Python
4.Binary Search TreeC, C++
5.Binary Tree to BSTC, C++, Java, Python
6.Binary Tree Views(Left, Right, Top, Bottom)C, C++, Java, Python
7.Fenwik TreeC, C++, Java, Python
8.Min-Indexed D-Heap AlgorithmC, C++, Java, Python
9.Morris TraversalC, C++, Python
10.Red-Black TreeC++, Java, Python
11.Segment TreeC, C++, Java, Python
12.Splay TreesC, C++, Java, Python
13.Symmetric Tree AlgorithmC, C++, Java, Python
14.Ternary Search TreeC, C++, Java, Python
15.TreapC, C++, Java, Python
16.Tree TraversalC, C++, Java, Python
17.TrieC, C++, Java, Python
18.Van Emde Boas TreeC, C++, Java, Python

Contributors 🫂


Steps for Contributing 🚀

Refer to this YouTube Video for reference!


  • Fork the Repo
  • Clone the forked Repo by typing the following commands in the terminal
$ git clone https://github.com/<your-github-username>/Algorithms.git
$ cd Algorithms
  • Now to add your resource to website, add an object with keys same as listed in existing objects in the file.
  • Save and commit your code.
  • Push to your fork of the repository , navigate to original repository and make a pull request.

Screenshot 2022-10-23 at 8 03 11 AM
Screenshot 2022-10-23 at 8 03 31 AM
$ git clone https://github.com/<your-github-username>/Algorithms.git
$ cd algorithms
  • Create a Branch using:
$ git checkout -b <new-branch-name>
  • Make changes to the code(for ex- add an update route)

  • To see modified changes

$ git status
  • Stage your changes using:
$ git add .
  • Commit your changes using:
$ git commit -m "add any comment"
  • Push the changes to the forked repository using:
$ git push origin <new-branch-name>
  • Navigate to the original repository and make a pull request
  • In case of merge conflict fetch and merge from the remote repository

Please don't forget to update the Available Resources section

Happy?? Star ⭐ this Repo. 🤩

About

A Repository for algorithms in C, C++, Python and Java

Topics

Resources

Code of conduct

Stars

361 stars

Watchers

6 watching

Forks

Used by

Contributors

Languages