/Algorithms

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

Primary LanguageC++Apache License 2.0Apache-2.0

A repository for all Algorithms



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, 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. Travelling Salesman Problem C, C++ Dynamic Programming
24. Bellman Ford C++ Graphs
25. Dijkstra C, C++, Java, Python Graphs
26. Dinic's Algorithm C++, Java, Python Graphs
27. Floyd Warshall C, C++, Java, Python Graphs
28. Hamiltonian Path Java Graphs
29. Kosaraju's Algorithm C++ Graphs
30. Prim's Algorithm C++, Java, Python Graphs
31. Tarjan Algorithm C++ Graphs
32. Activity Selection C, C++, Java, Python Greedy Algorithm
33. Fractional Knapsack C, C++, Python Greedy Algorithm
34. Job Sequencing C, C++, Java, Python Greedy Algorithm
35. Merge Interval Algorithm C, C++, Java, Python Greedy Algorithm
36. Optimal Merge Pattern C, C++, Java, Python Greedy Algorithm
37. Addition of two Linked Lists C++ Linked List
38. Circular Linked List C, C++, Python Linked List
39. Detect loop in a Linked List C++ Linked List
40. Doubly Linked List C, C++, Java, Python Linked List
41. Intersection of two Linked Lists C++ Linked List
42. Length of Linked List C, C++, Java, Python Linked List
43. LRU Cache Design C, C++, Java, Python Linked List
44. Merge Two Sorted Linked List C, C++, Java, Python Linked List
45. Palindrome Linked List C, C++, Java, Python Linked List
46. Reverse Linked List C, C++, Java, Python Linked List
47. Singly Linked List C, C++, Java, Python Linked List
48. Decision Tree Python Machine Learning
49. Feed-Forward Neural Network C++ Machine Learning
50. K-Means Clusters C++ Machine Learning
51. K-Nearest Neighbours C, C++ Machine Learning
52. Linear Regression C, C++, Python Machine Learning
53. Logistic Regression C++, Python Machine Learning
54. Armstrong Numbers C, C++, Java, Python Maths
55. Binary Exponentiation C, C++, Python Maths
56. Bennett's Formula C, C++, Java, Python Maths
57. Bisection Algorithm C, C++, Java, Python Maths
58. Closures of Relations C, C++, Java, Python Maths
59. Decimal <-> Binary Converter C, Python Maths
60. Extended Euclidean Algorithm C, C++, Java, Python Maths
61. Factorial of Number C, C++, Java, Python Maths
62. Factors C, C++, Java, Python Maths
63. GCD & LCM C, C++, Java, Python Maths
64. Modular Exponentiation C, C++, Java, Python Maths
65. Perfect Number C, C++, Java, Python Maths
66. Prefix-Postfix-Infix Interconversion C++, Python Maths
67. Prime Number C, C++, Java, Python Maths
68. Reverse Integer C++, Python Maths
69. Roman to Decimal converter C, C++, Java, Python Maths
70. Sieve Eratosthenes Algorithm C, C++, Java,Python Maths
71. KMP Algorithm C, C++, Java, Python Pattern Matching
72. Rabin Karp C++, Python Pattern Matching
73. Z - Algorithm C, C++, Java, Python Pattern Matching
74. BFS and DFS C++, Java Searching
75. Binary Search on 2D Matrix C,C++, Java, Python Searching
76. Binary Search C, C++, Java, Python Searching
77. Jump Search C, C++, Java, Python Searching
78. Linear Search C, C++, Java, Python Searching
79. Order Agnostic Binary Search C++, Python Searching
80. Ternary Search C, C++, Java, Python Searching
81. Sliding Window Problems C++, Java Sliding Window
82. 3 Sum Problem C, C++, Java, Python Sorting
83. Bubble Sort C, C++, Java, Python Sorting
84. Bucket Sort C++, Java Sorting
85. Counting Sort C, C++, Java,Python Sorting
86. Cyclic Sort C++, Java, Python Sorting
87. Cocktail Sort C++ Sorting
88. Dutch National Flag C++, Java, Python Sorting
89. Gnome Sort C, C++, Java, Python Sorting
90. Heap Sort C, C++, Java, Python Sorting
91. Insertion Sort C, C++, Java, Python Sorting
92. Merge Sort C, C++, Java, Python Sorting
93. Quick Sort C, C++, Java, Python Sorting
94. Radix Sort C, C++ Java, Python Sorting
95. Selection Sort C, C++, Java, Python Sorting
96. Topological Sort C++ Sorting
97. Wave Sort C++, Java, Python Sorting
98. Max Area in Histogram C, C++, Java, Python Stacks
99. Next Greater Element C, C++, Java, Python Stacks
100. Rain Water Problem C, C++, Java, Python Stacks
101. Stack Using Priority Queue C, C++, Java, Python Stacks
102. Beautiful String Algorithm C, C++, Java, Python Strings
103. Camel Case Algorithm C, C++, Java, Python Strings
104. Boyer-Moore Majority Voting C, C++, Python Sub-Arrays
105. Kadane's Algorithm C++, Java, Python Sub-Arrays
106. Shortest Unsorted Continuous Sub-Arrays C, C++, Java, Python Sub-Arrays
107. AVL Tree C, C++, Java, Python Trees
108. Binary Search Tree C, C++ Trees
109. Binary Tree to BST C, C++, Java, Python Trees
110. Morris Traversal C, C++, Python Trees
111. Red-Black Tree C++, Java, Python Trees
112. Splay Trees C, C++, Java Trees
113. Symmetric Tree Algorithm C, C++, Java, Python Trees
114. Tree Traversal C, C++, Java, Python Trees
115. 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. 🤩