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