1. How to swap two numbers without using a temporary variable?
  2. Remove duplicates from a given string
  3. Write a program to calculate pow(x,n)
  4. Program to find whether a no is power of two
  5. Lucky Numbers
  6. Write a function to get Nth node in a Linked List
  7. Given only a pointer/reference to a node to be deleted in a singly linked list, how do you delete it?
  8. Detect loop in a linked list
  9. Find the node with minimum value in a Binary Search Tree
  10. Smallest power of 2 greater than or equal to n
  11. Write a function to delete a Linked List
  12. Print reverse of a string using recursion
  13. Write a program to Calculate Size of a tree | Recursion
  14. Write Code to Determine if Two Trees are Identical
  15. Write a Program to Find the Maximum Depth or Height of a Tree
  16. Write a program to Delete a Tree
  17. Check for Integer Overflow
  18. Write a program to print all permutations of a given string
  19. Little and Big Endian Mystery
  20. Write a function that counts the number of times a given int occurs in a Linked List
  21. Given only a pointer to a node to be deleted in a singly linked list, how do you delete it?
  22. Write a program to add two numbers in base 14
  23. Write a function to get the intersection point of two Linked Lists
  24. Minimum number of jumps to reach end
  25. Given a binary tree, print out all of its root-to-leaf paths one per line.
  26. Lowest Common Ancestor in a Binary Search Tree.
  27. Count set bits in an integer
  28. Given a linked list which is sorted, how will you insert in sorted way
  29. Find the two non-repeating elements in an array of repeating elements
  30. Compute the minimum or maximum of two integers without branching
  31. Compute the integer absolute value (abs) without branching
  32. Level Order Tree Traversal
  33. Block swap algorithm for array rotation
  34. A program to check if a binary tree is BST or not
  35. Merge two sorted linked lists
  36. Print reverse of a Linked List without actually reversing
  37. Count Inversions in an array | Set 1 (Using Merge Sort)
  38. Two elements whose sum is closest to zero
  39. Find the smallest and second smallest elements in an array
  40. Convert an arbitrary Binary Tree to a tree that holds Children Sum Property
  41. Remove duplicates from a sorted linked list
  42. How to determine if a binary tree is height-balanced?
  43. Segregate 0s and 1s in an array
  44. Reverse a Doubly Linked List
  45. Split a Circular Linked List into two halves
  46. Root to leaf path sum equal to a given number
  47. Print list items containing all characters of a given word
  48. Maximum size square sub-matrix with all 1s
  49. Construct Tree from given Inorder and Preorder traversals
  50. Given a binary tree, print all root-to-leaf paths
  51. Practice questions for Linked List and Recursion
  52. Move last element to front of a given Linked List
  53. Pairwise swap elements of a given linked list
  54. Double Tree
  55. Print all combinations of points that can compose a given number
  56. Find the largest BST subtree in a given Binary Tree | Set 1
  57. Delete a node in a Doubly Linked List
  58. Ceiling in a sorted array
  59. Equilibrium index of an array
  60. Delete alternate nodes of a Linked List
  61. Maximum width of a binary tree
  62. A Product Array Puzzle
  63. Alternating split of a given Singly Linked List | Set 1
  64. Write you own Power without using multiplication(*) and division(/) operators
  65. Merge Sort for Linked Lists
  66. Identical Linked Lists
  67. Segregate Even and Odd numbers
  68. Find the two repeating elements in a given array
  69. Foldable Binary Trees
  70. Reverse a Linked List in groups of given size | Set 1
  71. Turn off the rightmost set bit
  72. Add 1 to a given number
  73. Print nodes at k distance from root
  74. Connect nodes at same level
  75. Turn an image by 90 degree
  76. Print a given matrix in spiral form
  77. Sorted insert for circular linked list
  78. Print BST keys in the given range
  79. Program to count number of set bits in an (big) array
  80. Rearrange positive and negative numbers in O(n) time and O(1) extra space
  81. Sliding Window Maximum (Maximum of all subarrays of size k)
  82. Find the smallest window in a string containing all characters of another string
  83. Check if array elements are consecutive | Added Method 3
  84. Reverse alternate K nodes in a Singly Linked List
  85. Rabin-Karp Algorithm for Pattern Searching
  86. Segregate even and odd nodes in a Linked List
  87. Overlapping Subproblems Property in Dynamic Programming | DP-1
  88. Given an array arr[], find the maximum j - i such that arr[j] > arr[i]
  89. Maximum Length Bitonic Subarray | Set 1 (O(n) time and O(n) space)
  90. XOR Linked List – A Memory Efficient Doubly Linked List | Set 2
  91. A Boolean Array Puzzle
  92. Floor and Ceil from a BST
  93. Longest Common Subsequence | DP-4
  94. Optimized Naive Algorithm for Pattern Searching
  95. Sudoku | Backtracking-7
  96. Check if a binary tree is subtree of another binary tree | Set 1
  97. Add two numbers represented by linked lists | Set 1
  98. Average of a stream of numbers
  99. Delete a given node in Linked List under given constraints
  100. Length of the longest substring without repeating characters
  101. Find a Fixed Point (Value equal to index) in a given array
  102. Count total set bits in all numbers from 1 to n
  103. Connect nodes at same level using constant extra space
  104. Find the maximum element in an array which is first increasing and then decreasing
  105. Sorted Linked List to Balanced BST
  106. Sorted Array to Balanced BST
  107. Implement two stacks in an array
  108. Check whether two strings are anagram of each other
  109. Populate Inorder Successor for all nodes
  110. In-place conversion of Sorted DLL to Balanced BST
  111. Print all permutations with repetition of characters
  112. AVL Tree | Set 1 (Insertion)
  113. Print all interleavings of given two strings
  114. Interleaving of two given strings with no common characters
  115. Binomial Coefficient | DP-9
  116. Convert a given tree to its Sum Tree
  117. AVL Tree | Set 2 (Deletion)
  118. Add two numbers without using arithmetic operators
  119. 0-1 Knapsack Problem | DP-10
  120. Merge Two Balanced Binary Search Trees
  121. Find the maximum sum leaf to root path in a Binary Tree
  122. Pattern Searching | Set 6 (Efficient Construction of Finite Automata)
  123. Finite Automata algorithm for Pattern Searching
  124. Hamiltonian Cycle | Backtracking-6
  125. Swap bits in a given number
  126. Find a triplet that sum to a given value
  127. Maximum Sum Increasing Subsequence | DP-14
  128. Boyer Moore Algorithm for Pattern Searching
  129. Find subarray with given sum | Set 1 (Nonnegative Numbers)
  130. Find the smallest positive number missing from an unsorted array | Set 1
  131. Find the two numbers with odd occurrences in an unsorted array
  132. Merge two BSTs with limited extra space
  133. Floyd Warshall Algorithm | DP-16
  134. Find a sorted subsequence of size 3 in linear time
  135. Palindrome Partitioning | DP-17
  136. Largest subarray with equal number of 0s and 1s
  137. Word Wrap Problem | DP-19
  138. Partition problem | DP-18
  139. Construct Special Binary Tree from given Inorder traversal
  140. Count numbers that don't contain 3
  141. Maximum Product Subarray
  142. Magic Square
  143. Find a pair with the given difference
  144. Find day of the week for a given date
  145. Find a triplet from three linked lists with sum equal to a given number
  146. DFA based division
  147. Rotate a Linked List
  148. Replace every element with the greatest element on right side
  149. Maximum Length Chain of Pairs | DP-20
  150. Find four elements that sum to a given value | Set 1 (n^3 solution)
  151. Find four elements that sum to a given value | Set 2 ( O(n^2Logn) Solution)
  152. Check whether a given Binary Tree is Complete or not | Set 1 (Iterative Solution)
  153. Make a fair coin from a biased coin
  154. Maximum circular subarray sum
  155. Find the row with maximum number of 1s
  156. Median of two sorted arrays of different sizes
  157. Print unique rows in a given boolean matrix
  158. Check divisibility by 7
  159. Find the element that appears once
  160. Count the number of possible triangles
  161. Construct Full Binary Tree from given preorder and postorder traversals
  162. Lexicographic rank of a string
  163. Print all permutations in sorted (lexicographic) order
  164. Shuffle a given array using Fisher–Yates shuffle Algorithm
  165. Construct BST from given preorder traversal | Set 1
  166. Construct BST from given preorder traversal | Set 2
  167. Iterative Quick Sort
  168. An in-place algorithm for String Transformation
  169. Space and time efficient Binomial Coefficient
  170. Longest Palindromic Substring | Set 2
  171. Add two numbers represented by linked lists | Set 2
  172. Find the number of islands | Set 1 (Using DFS)
  173. Reservoir Sampling
  174. Given a sequence of words, print all anagrams together | Set 1
  175. Disjoint Set (Or Union-Find) | Set 1 (Detect Cycle in an Undirected Graph)
  176. Iterative Postorder Traversal | Set 1 (Using Two Stacks)
  177. Select a random number from stream, with O(1) space
  178. Kruskal’s Minimum Spanning Tree Algorithm | Greedy Algo-2
  179. Efficient Huffman Coding for Sorted Input | Greedy Algo-4
  180. Prim’s Minimum Spanning Tree (MST) | Greedy Algo-5
  181. Closest Pair of Points using Divide and Conquer algorithm
  182. Program to print last 10 lines
  183. Optimal Binary Search Tree | DP-24
  184. Efficient program to calculate e^x
  185. Sort a linked list of 0s, 1s and 2s
  186. Write your own strcmp that ignores cases
  187. Efficient program to print all prime factors of a given number
  188. Morris traversal for Preorder
  189. Linked complete binary tree & its creation
  190. The Stock Span Problem
  191. Segment Tree | Set 1 (Sum of given range)
  192. Segment Tree | Set 2 (Range Minimum Query)
  193. Find the first circular tour that visits all petrol pumps
  194. Count words in a given string
  195. Largest Independent Set Problem | DP-26
  196. Flatten a multilevel linked list
  197. Arrange given numbers to form the biggest number | Set 1
  198. Maximum sum rectangle in a 2D matrix | DP-27
  199. Pancake sorting
  200. A Pancake Sorting Problem
  201. Find if there is a triplet in a Balanced BST that adds to zero
  202. Swap all odd and even bits
  203. Tug of War
  204. Find a pair with given sum in a Balanced BST
  205. Reverse Level Order Traversal
  206. Zigzag (or diagonal) traversal of Matrix
  207. Maximum Subarray Sum using Divide and Conquer algorithm
  208. Counting Sort
  209. Find position of the only set bit
  210. Convert a given Binary Tree to Doubly Linked List | Set 1
  211. Stock Buy Sell to Maximize Profit
  212. Write your own atoi()
  213. QuickSort on Doubly Linked List
  214. Minimum insertions to form a palindrome | DP-28
  215. Longest Common Substring | DP-29
  216. Find a peak element
  217. Print all possible combinations of r elements in a given array of size n
  218. Unbounded Binary Search Example (Find the point where a monotonically increasing function becomes positive first time)
  219. Random number generator in arbitrary probability distribution fashion
  220. Design a stack with operations on middle element
  221. Delete N nodes after M nodes of a linked list
  222. Check for Identical BSTs without building the trees
  223. Find the minimum element in a sorted and rotated array
  224. Convert a given Binary Tree to Doubly Linked List | Set 2
  225. Assembly Line Scheduling | DP-34
  226. Radix Sort
  227. Difference between sums of odd level and even level nodes of a Binary Tree
  228. Merge a linked list into another linked list at alternate positions
  229. Print Left View of a Binary Tree
  230. Add all greater values to every node in a given BST
  231. Extract Leaves of a Binary Tree in a Doubly Linked List
  232. Pairwise swap elements of a given linked list by changing links
  233. Splay Tree | Set 1 (Search)
  234. Splay Tree | Set 2 (Insert)
  235. Sum of all the numbers that are formed from root to leaf paths
  236. Given a linked list, reverse alternate nodes and append at the end
  237. Calculate the angle between hour hand and minute hand
  238. Given a linked list of line segments, remove middle points
  239. Swap nodes in a linked list without swapping data
  240. Point to next higher value node in a linked list with an arbitrary pointer
  241. Merge Sort for Doubly Linked List
  242. Rearrange a linked list such that all even and odd positioned nodes are together
  243. Add 1 to a number represented as linked list
  244. Print Binary Tree in 2-Dimensions
  245. Decimal Equivalent of Binary Linked List
  246. Unrolled Linked List | Set 1 (Introduction)
  247. Deletion from a Circular Linked List
  248. Program to print the diamond shape
  249. Program to find second most frequent character
  250. Find maximum (or minimum) in Binary Tree
  251. Change a Binary Tree so that every node stores sum of all nodes in left subtree
  252. How to implement decrease key or change key in Binary Search Tree?
  253. Insertion Sort
  254. QuickSort
  255. Selection Sort
  256. Bubble Sort
  257. Program to find sum of elements in a given array
  258. Program to check if a given year is leap year
  259. Program to multiply two matrices
  260. Program for Tower of Hanoi
  261. Program for addition of two matrices
  262. Program for subtraction of matrices
  263. Program to find area of a triangle
  264. Program to print first n Fibonacci Numbers | Set 1
  265. C Program to print Floyd's triangle
  266. Iterative Search for a key 'x' in Binary Tree
  267. Linked List | Set 1 (Introduction)
  268. Linked List | Set 2 (Inserting a node)
  269. Queue - Linked List Implementation
  270. Doubly Linked List | Set 1 (Introduction and Insertion)
  271. Circular Linked List | Set 2 (Traversal)
  272. Find Length of a Linked List (Iterative and Recursive)
  273. Search an element in a Linked List (Iterative and Recursive)
  274. Stack | Set 3 (Reverse a string using stack)
  275. Stack | Set 4 (Evaluation of Postfix Expression)
  276. Queue | Set 1 (Introduction and Array Implementation)
  277. Stack Data Structure (Introduction and Program)
  278. Check whether the length of given linked list is Even or Odd
  279. Program to sort an array of strings using Selection Sort
  280. Squareroot(n)-th node in a Linked List
  281. Rotate Linked List block wise
  282. Make middle node head in a linked list
  283. Program to print hollow rectangle or square star patterns
  284. Sorted insert in a doubly linked list with head and tail pointers
  285. Sum and Product of maximum and minimum element in Binary Tree