/Algorithms

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

Primary LanguageC++Apache License 2.0Apache-2.0

A repository for all Algorithms





GitHub repo size GitHub repo file count

GitHub issues GitHub pull requests GitHub GitHub forks GitHub Repo stars


Tech Stacks





Programs we have been a part of

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


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

No. Algorithm Name Available languages Category
1. Diagonal Print Algorithm in 2D Array C, C++, Java, Python Arrays
2. Spiral Print Matrix C, C++, Python Arrays
3. Caesar Cipher C, C++, Java, Python Cryptography
4. Diffie - Hellman Algorithm Python Cryptography
5. Hill Cipher C++, Java, Python Cryptography
6. Homophonic Substitution C, C++, Java, Python Cryptography
7. Railfence Cipher C, C++, Java, Python Cryptography
8. RSA C, C++, Java, Python Cryptography
9. SHA - 256 C, C++, Java, Python Cryptography
10. Vernam Cipher C, C++, Java, Python Cryptography
11. Vignere Cipher C++, Java, Python Cryptography
12. Huffman Coding C, C++, Java,Python Data Compression
13. Banker's Algorithm C, C++, Java,Python Deadlock Avoidance
14. Perceptron Learning - Boolean Functions Python Deep Learning
15. Karatsuba Algorithm C++, Java, Python Divide and Conquer
16. Strassen's Matrix Multiplication C, C++, Java, Python Divide and Conquer
17. 0/1 Knapsack C, C++, Java, Python Dynamic Programming
18. Coin change problem C, C++, Java, Python Dynamic Programming
19. Edit Distance C++ Dynamic Programming
20. Longest Common Subsequence C, C++, Java Dynamic Programming
21. Matrix Chain Multiplication C++ Dynamic Programming
22. Minimum Jump Algorithm C, C++, Java, Python Dynamic Programming
23. Minimum Sum Partition Problem C, C++, Java, Python Dynamic Programming
24. Travelling Salesman Problem C, C++ Dynamic Programming
25. Bellman Ford C++ Graphs
26. Dijkstra C, C++, Java, Python Graphs
27. Dinic's Algorithm C++, Java, Python Graphs
28. Floyd Warshall C, C++, Java, Python Graphs
29. Hamiltonian Path Java Graphs
30. Kosaraju's Algorithm C++ Graphs
31. Prim's Algorithm C++, Java, Python Graphs
32. Tarjan Algorithm C++ Graphs
33. Activity Selection C, C++, Java, Python Greedy Algorithm
34. Fractional Knapsack C, C++, Python Greedy Algorithm
35. Job Sequencing C, C++, Java, Python Greedy Algorithm
36. Merge Interval Algorithm C, C++, Java, Python Greedy Algorithm
37. Optimal Merge Pattern C, C++, Java, Python Greedy Algorithm
38. Addition of two Linked Lists C++ Linked List
39. Circular Linked List C, C++, Python Linked List
40. Detect loop in a Linked List C++ Linked List
41. Doubly Linked List C, C++, Java, Python Linked List
42. Intersection of two Linked Lists C++ Linked List
43. Length of Linked List C, C++, Java, Python Linked List
44. LRU Cache Design C, C++, Java, Python Linked List
45. Merge Two Sorted Linked List C, C++, Java, Python Linked List
46. Palindrome Linked List C, C++, Java, Python Linked List
47. Reverse Linked List C, C++, Java, Python Linked List
48. Singly Linked List C, C++, Java, Python Linked List
49. Decision Tree Python Machine Learning
50. Feed-Forward Neural Network C++ Machine Learning
51. K-Means Clusters C++, Python Machine Learning
52. K-Nearest Neighbours C, C++ Machine Learning
53. Linear Regression C, C++, Python Machine Learning
54. Logistic Regression C++, Python Machine Learning
55. Armstrong Numbers C, C++, Java, Python Maths
56. Binary Exponentiation C, C++, Python Maths
57. Bennett's Formula C, C++, Java, Python Maths
58. Bisection Algorithm C, C++, Java, Python Maths
59. Closures of Relations C, C++, Java, Python Maths
60. Decimal <-> Binary Converter C, Python Maths
61. Extended Euclidean Algorithm C, C++, Java, Python Maths
62. Factorial of Number C, C++, Java, Python Maths
63. Factors C, C++, Java, Python Maths
64. GCD & LCM C, C++, Java, Python Maths
65. Modular Exponentiation C, C++, Java, Python Maths
66. Perfect Number C, C++, Java, Python Maths
67. Prefix-Postfix-Infix Interconversion C++, Python Maths
68. Prime Number C, C++, Java, Python Maths
69. Reverse Integer C++, Python Maths
70. Roman to Decimal converter C, C++, Java, Python Maths
71. Sieve Eratosthenes Algorithm C, C++, Java,Python Maths
72. KMP Algorithm C, C++, Java, Python Pattern Matching
73. Rabin Karp C++, Python Pattern Matching
74. Z - Algorithm C, C++, Java, Python Pattern Matching
75. String Permutation C, C++, Java, Python Recursion
76. Tower of Hanoi C, C++ Recursion
77. BFS and DFS C++, Java Searching
78. Binary Search on 2D Matrix C,C++, Java, Python Searching
79. Binary Search C, C++, Java, Python Searching
80. Jump Search C, C++, Java, Python Searching
81. Linear Search C, C++, Java, Python Searching
82. Order Agnostic Binary Search C++, Python Searching
83. Ternary Search C, C++, Java, Python Searching
84. Sliding Window Problems C++, Java Sliding Window
85. 3 Sum Problem C, C++, Java, Python Sorting
86. Bubble Sort C, C++, Java, Python Sorting
87. Bucket Sort C++, Java Sorting
88. Counting Sort C, C++, Java,Python Sorting
89. Cyclic Sort C++, Java, Python Sorting
90. Cocktail Sort C++ Sorting
91. Dutch National Flag C++, Java, Python Sorting
92. Gnome Sort C, C++, Java, Python Sorting
93. Heap Sort C, C++, Java, Python Sorting
94. Insertion Sort C, C++, Java, Python Sorting
95. Merge Sort C, C++, Java, Python Sorting
96. Quick Sort C, C++, Java, Python Sorting
97. Radix Sort C, C++ Java, Python Sorting
98. Selection Sort C, C++, Java, Python Sorting
99. Topological Sort C++ Sorting
100. Wave Sort C++, Java, Python Sorting
101. Max Area in Histogram C, C++, Java, Python Stacks
102. Next Greater Element C, C++, Java, Python Stacks
103. Rain Water Problem C, C++, Java, Python Stacks
104. Stack Using Priority Queue C, C++, Java, Python Stacks
105. Beautiful String Algorithm C, C++, Java, Python Strings
106. Camel Case Algorithm C, C++, Java, Python Strings
107. Boyer-Moore Majority Voting C, C++, Python Sub-Arrays
108. Kadane's Algorithm C++, Java, Python Sub-Arrays
109. Shortest Unsorted Continuous Sub-Arrays C, C++, Java, Python Sub-Arrays
110. AVL Tree C, C++, Java, Python Trees
111. Binary Search Tree C, C++ Trees
112. Binary Tree to BST C, C++, Java, Python Trees
113. Morris Traversal C, C++, Python Trees
114. Red-Black Tree C++, Java, Python Trees
115. Splay Trees C, C++, Java Trees
116. Symmetric Tree Algorithm C, C++, Java, Python Trees
117. Tree Traversal C, C++, Java, Python Trees
118. Trie C++, Java Trees

Contributors 🫂


Steps for Contributing 🚀

Refer to this YouTube Video for reference!


  • Fork and clone the Repo by typing the following commands in the terminal
$ git clone https://github.com/Kumar-laxmi/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
  • Clone the Repository after forking
$ git clone https://github.com/<your-github-username>/Algorithms.git

$ cd algorithms
  • Make changes to the code(for ex- add an update route)

  • Create a Branch using:

$ git checkout -b <branch-name>
  • 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 <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. 🤩