200 Most Important Programs to Prepare for Any Interview

  1. Print the sum of two numbers
  2. Print the sum of three numbers
  3. Calculate the average of three numbers
  4. Check if a number is even or odd
  5. Swap two numbers using third variable
  6. Swap two numbers without using third variable
  7. Find the maximum of two numbers
  8. Find the minimum of two numbers
  9. Calculate the factorial of a number using iterative method
  10. Calculate the factorial of a number using a recursive function
  11. Print Fibonacci series using iterative method
  12. Print Fibonacci series using recursive method
  13. Check if a number is a prime
  14. Check if a number is a palindrome using an iterative method
  15. Check if a number is a palindrome using recursive method
  16. Find the reverse of a number
  17. Calculate the power of a number
  18. Print multiplication table
  19. Find the square root of a number
  20. Calculate the area of a triangle
  21. Calculate the area of a rectangle
  22. Calculate the area of a circle
  23. Check if a year is a leap year
  24. Convert temperature from Celsius to Fahrenheit
  25. Convert temperature from Fahrenheit to Celsius
  26. Convert a decimal number to binary
  27. Convert a binary number to decimal
  28. Convert a decimal number to hexadecimal
  29. Convert a hexadecimal number to decimal
  30. Check if a string is a palindrome
  31. Find the length of a string
  32. Concatenate two strings
  33. Compare two strings
  34. Copy one string to another
  35. Reverse a string
  36. Count the number of vowels in a string
  37. Count the number of words in a string
  38. Sort an array in ascending order
  39. Sort an array in descending order
  40. Find the largest element in an array
  41. Find the smallest element in an array
  42. Calculate the sum of elements in an array
  43. Calculate the average of elements in an array
  44. Search for an element in an array
  45. Insert an element in an array
  46. Delete an element from an array
  47. Merge two arrays
  48. Reverse an array
  49. Multiply two matrices
  50. Add two matrices
  51. Subtract two matrices
  52. Transpose a matrix
  53. Check if a matrix is symmetric
  54. Find the sum of the main diagonal elements of a matrix
  55. Find the sum of the secondary diagonal elements of a matrix
  56. Calculate the determinant of a matrix
  57. Multiply two complex numbers
  58. Add two complex numbers
  59. Subtract two complex numbers
  60. Calculate the GCD of two numbers
  61. Calculate the LCM of two numbers
  62. Generate random numbers
  63. Implement bubble sort algorithm
  64. Implement selection sort algorithm
  65. Implement insertion sort algorithm
  66. Implement merge sort algorithm
  67. Implement quicksort algorithm
  68. Implement binary search algorithm
  69. Implement linear search algorithm
  70. Implement stack using an array
  71. Implement stack using a linked list
  72. Implement queue using an array
  73. Implement queue using a linked list
  74. Implement circular queue
  75. Implement singly linked list
  76. Implement doubly linked list
  77. Implement binary tree
  78. Implement binary search tree
  79. Implement heap data structure
  80. Implement graph data structure
  81. Implement breadth-first search algorithm
  82. Implement depth-first search algorithm
  83. Implement Dijkstra’s algorithm
  84. Implement Kruskal’s algorithm
  85. Implement Prim’s algorithm
  86. Implement Bellman-Ford algorithm
  87. Implement Floyd-Warshall algorithm
  88. Implement topological sorting algorithm
  89. Implement bubble sort for a linked list
  90. Implement insertion sort for a linked list
  91. Implement merge sort for a linked list
  92. Implement quicksort for a linked list
  93. Implement selection sort for a linked list
  94. Implement binary search for a linked list
  95. Implement a circular linked list
  96. Implement a priority queue
  97. Implement a hash table
  98. Implement a binary search tree (BST) with insert, search, and delete operations
  99. Implement a stack using queues
  100. Implement a queue using stacks
  101. Implement a trie data structure
  102. Implement the breadth-first traversal of a binary tree
  103. Implement the depth-first traversal (preorder, inorder, postorder) of a binary tree
  104. Implement the iterative inorder traversal of a binary tree
  105. Implement the Morris inorder traversal of a binary tree
  106. Implement the iterative preorder traversal of a binary tree
  107. Implement the iterative postorder traversal of a binary tree
  108. Implement the level-order traversal of a binary tree
  109. Implement the inorder successor in a binary search tree
  110. Implement the LRU (Least Recently Used) cache algorithm
  111. Implement the radix sort algorithm
  112. Implement the counting sort algorithm
  113. Implement the bucket sort algorithm
  114. Implement the shell sort algorithm
  115. Implement the Boyer-Moore string search algorithm
  116. Implement the Knuth-Morris-Pratt (KMP) string search algorithm
  117. Implement the Rabin-Karp string search algorithm
  118. Implement the AVL tree with insert, search, and delete operations
  119. Implement the Red-Black tree with insert, search, and delete operations
  120. Implement the B-tree with insert and search operations
  121. Implement the Trie data structure for autocomplete suggestions
  122. Implement the A* search algorithm
  123. Implement the Floyd-Warshall algorithm for all pairs shortest paths
  124. Implement the Ford-Fulkerson algorithm for maximum flow
  125. Implement the Kruskal’s algorithm for minimum spanning tree
  126. Implement the Prim’s algorithm for minimum spanning tree
  127. Implement the Bellman-Ford algorithm for single-source shortest path
  128. Implement the Dijkstra’s algorithm for single-source shortest path
  129. Implement the Depth-First Search (DFS) algorithm
  130. Implement the Breadth-First Search (BFS) algorithm
  131. Implement the Strongly Connected Components (SCC) algorithm using Tarjan’s algorithm
  132. Implement the Minimum Spanning Tree (MST) using the Boruvka’s algorithm
  133. Implement the Longest Common Subsequence (LCS) algorithm
  134. Implement the Longest Increasing Subsequence (LIS) algorithm
  135. Implement the 0/1 Knapsack problem using dynamic programming
  136. Implement the Matrix Chain Multiplication (MCM) problem using dynamic programming
  137. Implement the Edit Distance algorithm using dynamic programming
  138. Implement the Coin Change problem using dynamic programming
  139. Implement the Subset Sum problem using dynamic programming
  140. Implement the N-Queens problem using backtracking
  141. Implement the Sudoku solver using backtracking
  142. Implement the Hamiltonian Cycle problem using backtracking
  143. Implement the Graph Coloring problem using backtracking
  144. Implement the Traveling Salesman Problem (TSP) using dynamic programming
  145. Implement the Huffman coding algorithm for data compression
  146. Implement the RSA algorithm for encryption and decryption
  147. Implement the SHA-256 algorithm for secure hashing
  148. Implement the MD5 algorithm for hashing
  149. Implement the DES algorithm for encryption and decryption
  150. Implement the AES algorithm for encryption and decryption
  151. Implement the Bubble Sort algorithm for strings
  152. Implement the Selection Sort algorithm for strings
  153. Implement the Insertion Sort algorithm for strings
  154. Implement the Merge Sort algorithm for strings
  155. Implement the Quick Sort algorithm for strings
  156. Implement the Counting Sort algorithm for strings
  157. Implement the Radix Sort algorithm for strings
  158. Implement the Shell Sort algorithm for strings
  159. Implement the Binary Search algorithm for strings
  160. Implement the Linear Search algorithm for strings
  161. Implement the Run-Length Encoding algorithm for strings
  162. Implement the Caesar Cipher algorithm for encryption and decryption of strings
  163. Implement the Vigenère Cipher algorithm for encryption and decryption of strings
  164. Implement the Rail Fence Cipher algorithm for encryption and decryption of strings
  165. Implement the Reverse a String algorithm
  166. Implement the Check if a String is Palindrome algorithm
  167. Implement the Count the Number of Vowels in a String algorithm
  168. Implement the Count the Number of Words in a String algorithm
  169. Implement the Check if two Strings are Anagrams algorithm
  170. Implement the Check if a String is a Pangram algorithm
  171. Implement the Check if a String is a Substring of Another algorithm
  172. Implement the Check if a String is a Rotation of Another algorithm
  173. Implement the Remove Duplicates from a String algorithm
  174. Implement the Replace Spaces in a String with %20 algorithm
  175. Implement the Find the First Non-Repeated Character in a String algorithm
  176. Implement the Find the Longest Palindromic Substring in a String algorithm
  177. Implement the Check if a String is a Valid Parentheses sequence algorithm
  178. Implement the Convert String to Integer algorithm
  179. Implement the Convert Integer to Roman Numeral algorithm
  180. Implement the Convert Roman Numeral to Integer algorithm
  181. Implement the Find the Missing Number in an Array algorithm
  182. Implement the Find the Duplicate Number in an Array algorithm
  183. Implement the Find the Majority Element in an Array algorithm
  184. Implement the Find the Kth Largest Element in an Array algorithm
  185. Implement the Find the Peak Element in an Array algorithm
  186. Implement the Find the Missing Number in a Sorted Array algorithm
  187. Implement the Find the Maximum Subarray Sum algorithm
  188. Implement the Find the Longest Increasing Subarray algorithm
  189. Implement the Find the Longest Common Prefix algorithm
  190. Implement the Check if an Array is Sorted algorithm
  191. Implement the Rotate an Array algorithm
  192. Implement the Merge Two Sorted Arrays algorithm
  193. Implement the Find the Union of Two Arrays algorithm
  194. Implement the Find the Intersection of Two Arrays algorithm
  195. Implement the Find the Smallest Missing Positive Number in an Unsorted Array algorithm
  196. Implement the Sort an Array of 0s, 1s, and 2s algorithm
  197. Implement the Find the Two Elements with Sum Closest to Zero in an Array algorithm
  198. Implement the Find the Elements with Sum Closest to Zero
  199. Implement the Find the Elements with Sum Closest to a Given Number in an Array algorithm
  200. Implement the Find the Triplet with Sum Closest to a Given Number in an Array algorithm
  201. Implement the Find the Pair with Given Difference in an Array algorithm
  202. Implement the Find the Longest Consecutive Subsequence in an Array algorithm
  203. Implement the Find the Majority Element in a Sorted Array algorithm
  204. Implement the Find the Maximum Product Subarray algorithm
  205. Implement the Find the Maximum Sum Subarray algorithm
  206. Implement the Find the Subarray with Given Sum algorithm
  207. Implement the Find the Longest Subarray with Equal 0s and 1s algorithm
  208. Implement the Find the Longest Subarray with Equal 1s and 0s algorithm
  209. Implement the Find the First Repeating Element in an Array algorithm
  210. Implement the Find the Leaders in an Array algorithm
  211. Implement the Find the Next Permutation of an Array algorithm
  212. Implement the Find the Previous Permutation of an Array algorithm
Scroll to Top