- 1. Find a pair with the given sum in an array
Array, Sorting Amazon, Hashing TopClassic, TopLiked ↗Easy - 2. Check if a subarray with 0 sum exists or not
Array Hashing TopLiked ↗Medium - 3. Print all subarrays with 0 sum
Array Amazon, Hashing TopLiked ↗Medium - 4. Sort binary array in linear time
Array, Sorting TopLiked ↗Easy - 5. Find maximum length subarray having a given sum
Array Hashing TopLiked ↗Medium - 6. Find the largest subarray having an equal number of 0’s and 1’s
Array Hashing TopLiked ↗Medium - 7. Find the maximum product of two integers in an array
Array, Sorting TopLiked ↗Easy - 8. Sort an array of 0’s, 1’s, and 2’s (Dutch National Flag Problem)
Array, Sorting Algorithm, Amazon, Microsoft TopClassic, TopLiked ↗Medium - 9. In-place merge two sorted arrays
Array, Sorting TopLiked ↗Medium - 10. Merge two arrays by satisfying given constraints
Array, Sorting ↗Medium - 11. Find index of 0 to be replaced to get the maximum length sequence of continuous ones
Array Amazon ↗Hard - 12. Shuffle an array using Fisher–Yates shuffle algorithm
Array Algorithm ↗Medium - 13. Rearrange an array with alternate high and low elements
Array Amazon TopLiked ↗Medium - 14. Find equilibrium index of an array
Array Amazon ↗Easy - 15. Find the largest subarray formed by consecutive integers
Array Amazon, Hashing TopClassic, TopLiked ↗Medium - 16. Boyer–Moore Majority Vote Algorithm
Array Algorithm, Amazon, Hashing, Microsoft TopAlgo ↗Easy - 17. Move all zeros present in an array to the end
Array, Sorting Amazon TopLiked ↗Easy - 18. Replace every array element with the product of every other element
Array Recursive ↗Medium - 19. Longest Bitonic Subarray Problem
Array Algorithm TopClassic ↗Medium - 20. Find maximum difference between two array elements that satisfies given constraints
Array Amazon TopLiked ↗Medium - 21. Maximum Sum Subarray Problem (Kadane’s Algorithm)
Array, DP Algorithm, Amazon, Microsoft, Must Know TopAlgo, TopClassic, TopAlgo ↗Easy - 22. Print continuous subarray with maximum sum
Array ↗Medium - 23. Maximum Sum Circular Subarray
Array Algorithm TopLiked ↗Hard - 24. Find all distinct combinations of a given length – I
Array, Sorting Recursive TopLiked ↗Medium - 25. Find all distinct combinations of a given length – II
Array, Sorting Recursive ↗Medium - 26. Find maximum sequence of continuous 1’s formed by replacing at-most
k
0’s by 1’sArray Sliding Window ↗Medium - 27. Find minimum sum subarray of size
k
Array Amazon, Sliding Window ↗Medium - 28. Maximum Product Subarray Problem
Array Algorithm, Amazon TopClassic, TopLiked ↗Hard - 29. Find a subarray having the given sum in an integer array
Array Amazon, Hashing, Sliding Window ↗Medium - 30. Find the smallest subarray length whose sum of elements is greater than
k
Array Sliding Window ↗Medium - 31. Find the smallest window in an array sorting which will make the entire array sorted
Array, Sorting ↗Medium - 32. Find maximum sum path involving elements of given arrays
Array Amazon, Microsoft ↗Medium - 33. Find maximum profit earned by buying and selling shares any number of times
Array Amazon TopLiked ↗Medium - 34. Trapping Rain Water Problem
Array Algorithm, Amazon, Microsoft TopClassic ↗Hard - 35. Find minimum platforms needed to avoid delay in the train arrival
Array, Sorting Greedy ↗Medium - 36. Decode an array constructed from another array
Array ↗Medium - 37. Sort an array in one swap whose two elements are swapped
Array, Sorting ↗Easy - 38. Find a triplet with the given sum in an array
Array, Sorting Hashing, Recursive TopClassic, TopLiked ↗Medium - 39. Find the longest continuous sequence length with the same sum in given binary arrays
Array Hashing ↗Hard - 40. Reverse every consecutive
m
-elements of a subarrayArray Recursive ↗Medium - 41. Maximum Product Subset Problem
Array Algorithm, Recursive TopClassic ↗Easy - 42. Find pairs with difference
k
in an arrayArray, Sorting Hashing ↗Easy - 43. 4–Sum Problem | Quadruplets with a given sum
Array, Sorting Algorithm, Hashing, Recursive TopClassic, TopLiked ↗Medium - 44. Print all quadruplets with a given sum | 4 sum problem extended
Array, Sorting ↗Medium - 45. Count quadruplets with a zero sum
Array Hashing Medium - 46. Quickselect Algorithm
Array Algorithm, Recursive TopAlgo ↗Medium - 47. Rearrange array such that
A[A[i]]
is set toi
for every elementA[i]
Array ↗Hard - 48. Print all triplets that form an arithmetic progression
Array ↗Medium - 49. Print all triplets that form a geometric progression
Array ↗Medium - 50. Group elements of an array based on their first occurrence
Array Hashing ↗Medium - 51. Find minimum difference between the index of two given elements present in an array
Array ↗Easy - 52. Find maximum absolute difference between the sum of two non-overlapping subarrays
Array ↗Hard - 53. Find all symmetric pairs in an array of pairs
Array Hashing ↗Medium - 54. Find the closest pair to a given sum in two sorted arrays
Array ↗Medium - 55. Partition an array into two subarrays with the same sum
Array ↗Easy - 56. Find the count of distinct elements in every subarray of size
k
Array Hashing, Microsoft, Sliding Window ↗Medium - 57. Find two numbers with maximum sum formed by array digits
Array, Sorting ↗Easy - 58. Print all subarrays of an array having distinct elements
Array Hashing, Sliding Window ↗Medium - 59. Find a triplet having the maximum product in an array
Array, Sorting ↗Medium - 60. Find the minimum index of a repeating element in an array
Array Hashing ↗Easy - 61. Find a pair with a minimum absolute sum in an array
Array, Sorting ↗Easy - 62. Find an index of the maximum occurring element with equal probability
Array Hashing ↗Easy - 63. Check if an array is formed by consecutive integers
Array Hashing ↗Medium - 64. Find two non-overlapping pairs having the same sum in an array
Array Hashing ↗Medium - 65. Add elements of two arrays into a new array
Array Recursive ↗Easy - 66. Find minimum product among all combinations of triplets in an array
Array, Sorting ↗Medium - 67. Count distinct absolute values in a sorted array
Array Hashing, Sliding Window ↗Medium - 68. Print all combinations of positive integers in increasing order that sums to a number
Array Recursive ↗Hard - 69. Find subarrays with a given sum in an array
Array Hashing TopLiked ↗Medium - 70. Find maximum length sequence of continuous ones (Using Sliding Window)
Array Amazon, Sliding Window ↗Medium - 71. Find maximum length sequence of continuous ones
Array Amazon ↗Medium - 72. Find the index that divides an array into two non-empty subarrays with equal sum
Array ↗Easy - 73. Efficiently calculate the frequency of all elements present in a limited range array
Array Hashing ↗Medium - 74. Rearrange an array such that it contains alternate positive and negative numbers
Array, Sorting ↗Medium - 75. Find the sorted triplet in an array
Array ↗Medium - 76. Shuffle an array according to the given order of elements
Array Hashing ↗Medium - 77. Count the number of strictly increasing subarrays in an array
Array ↗Medium - 78. Find duplicates within a range
k
in an arrayArray Hashing, Sliding Window ↗Easy - 79. Find a minimum range with at least one element from each of the given arrays
Array Microsoft ↗Hard - 80. Find the longest subsequence formed by consecutive integers
Array Hashing TopClassic ↗Medium - 81. Determine the index of an element that satisfies given constraints in an array
Array ↗Easy - 82. Find minimum moves required for converting a given array to an array of zeroes
Array ↗Medium - 83. Left rotate an array
Array ↗Easy - 84. Right rotate an array
k
timesArray TopLiked ↗Easy - 85. Activity Selection Problem
Array, Sorting Algorithm, Amazon, Greedy TopClassic ↗Easy - 86. Job Sequencing Problem with Deadlines
Array, Sorting Algorithm, Greedy TopClassic, TopLiked ↗Medium - 87. 3–partition problem extended | Printing all partitions
Array Recursive ↗Hard - 88. Count triplets which form an inversion in an array
Array ↗Easy - 89. Determine whether an array can be divided into pairs with a sum divisible by
k
Array Hashing ↗Medium - 90. Find minimum removals required in an array to satisfy given constraints
Array ↗Medium - 91. Find a pair with the given sum in a circularly sorted array
Array ↗Medium - 92. Segregate positive and negative integers in linear time
Array, Sorting ↗Easy - 93. Find all distinct combinations of a given length that sum to a target
Array Recursion Medium - 94. Find all duplicate elements in a limited range array
Hashing Easy - 95. Find the minimum and maximum element in an array using minimum comparisons
Array ↗Medium - 96. Insertion Sort Algorithm
Array, Sorting Algorithm, Must Know, Recursive TopAlgo ↗Easy - 97. Selection Sort Algorithm
Array, Sorting Algorithm, Must Know, Recursive TopAlgo ↗Easy - 98. Bubble Sort Algorithm
Array, Sorting Algorithm, Recursive ↗Easy - 99. Merge Sort Algorithm
Array, Divide & Conquer, Sorting Algorithm, Microsoft, Must Know, Recursive TopAlgo ↗Easy - 100. Iterative Merge Sort Algorithm (Bottom-up Merge Sort)
Array, Divide & Conquer, Sorting Algorithm ↗Medium - 101. Quicksort Algorithm
Array, Divide & Conquer, Sorting Algorithm, Must Know, Recursive TopAlgo ↗Medium - 102. Hybrid QuickSort Algorithm
Array, Divide & Conquer, Sorting Algorithm, Recursive ↗Medium - 103. Quicksort using Dutch National Flag Algorithm
Array, Divide & Conquer, Sorting Algorithm, Recursive ↗Medium - 104. Quicksort algorithm using Hoare’s partitioning scheme
Array, Divide & Conquer, Sorting Algorithm, Recursive ↗Medium - 105. Counting Sort Algorithm
Array, Sorting Algorithm, Must Know TopAlgo ↗Easy - 106. In-place vs out-of-place algorithms
Sorting Algorithm, Must Know Beginner - 107. Inversion count of an array
Array, Divide & Conquer, Sorting Algorithm, Amazon, Microsoft, Recursive TopLiked ↗Hard - 108. Problems solved using partitioning logic of Quicksort
Array, Sorting Easy - 109. Sort elements by their frequency and index
Array, Sorting Amazon, Hashing, Microsoft ↗Medium - 110. Sort an array based on order defined by another array
Array, Sorting Amazon, Hashing ↗Medium - 111. Efficiently sort an array with many duplicated values
Array, Sorting Hashing ↗Medium - 112. Find the largest number possible from a given set of numbers
Array, Sorting TopLiked ↗Medium - 113. Find surpasser count for each array element
Array, Sorting Hashing, Recursive ↗Hard - 114. Segregate positive and negative integers using merge sort
Array, Divide & Conquer, Sorting ↗Medium - 115. How to Boost QuickSort Performance?
Sorting Recursive Easy - 116. Water Jugs Problem
Array, Sorting Algorithm, Recursive TopClassic Hard - 117. Print matrix in spiral order
Matrix Amazon, Recursive TopLiked ↗Medium - 118. Create a spiral matrix from a given array
Matrix ↗Medium - 119. Shift all matrix elements by 1 in spiral order
Matrix ↗Medium - 120. Change all elements of row
i
and columnj
in a matrix to 0 if cell(i, j)
is 0Matrix Amazon TopLiked ↗Medium - 121. Print diagonal elements of a matrix having a positive slope
Matrix ↗Medium - 122. Replace all occurrences of 0 that are not surrounded by 1 in a binary matrix
Matrix Depth-First Search, Recursive ↗Medium - 123. In-place rotate matrix by 90 degrees in a clockwise direction
Matrix Amazon ↗Easy - 124. Count negative elements present in the sorted matrix in linear time
Matrix ↗Easy - 125. Report all occurrences of an element in a row-wise and column-wise sorted matrix
Matrix ↗Medium - 126. Check if a matrix is a Toeplitz or not
Matrix ↗Easy - 127. In-place rotate matrix by 180 degrees
Matrix ↗Medium - 128. Fill binary matrix with alternating rectangles of 0 and 1
Matrix ↗Medium - 129. Find all common elements present in each row of a matrix
Matrix Hashing ↗Medium - 130. Find common elements present in all rows of a matrix
Matrix Hashing ↗Medium - 131. Find the index of a row containing the maximum number of 1’s in a binary matrix
Matrix ↗Hard - 132. Find the largest square submatrix which is surrounded by all 1’s
Matrix ↗Medium - 133. Print a spiral square matrix without using any extra space
Matrix ↗Hard - 134. Young Tableau | Insert, Search, Extract-Min, Delete, Replace
Matrix Algorithm, Recursive ↗Hard - 135. Replace all occurrences of 0 that are surrounded by 1 in a binary matrix
Matrix Depth-First Search, Recursive ↗Medium - 136. Find the area of the largest rectangle of 1’s in a binary matrix
Matrix ↗Hard - 137. Find maximum value of
M[c][d] – M[a][b]
over all choices of indexesMatrix ↗Medium - 138. Generate pascal triangle of the given size
Matrix Easy - 139. Find perimeter of an Island
Matrix Easy - 140. Find kth smallest value in a sorted matrix
Matrix, Divide & Conquer Binary Search Medium - 141. Sort an array using Young tableau
Array, Matrix, Sorting Recursive ↗Hard - 142. Print all possible solutions to N–Queens problem
Backtracking, Matrix Algorithm, Recursive TopClassic, TopLiked ↗Hard - 143. Print all possible Knight’s tours on a chessboard
Backtracking, Matrix Recursive TopClassic, TopLiked ↗Hard - 144. Find the shortest path in a maze
Backtracking, Matrix Maze, Recursive TopLiked ↗Medium - 145. Find the longest possible route in a matrix
Backtracking, Matrix Maze, Recursive ↗Medium - 146. Find the path from source to destination in a matrix that satisfies given constraints
Backtracking, Matrix Depth-First Search, Maze, Recursive ↗Medium - 147. Find the total number of unique paths in a maze from source to destination
Backtracking, Matrix Maze, Recursive TopLiked ↗Medium - 148. Find all combinations of elements satisfying given constraints
Array, Backtracking Amazon, Recursive ↗Medium - 149. K–Partition Problem | Printing all partitions
Array, Backtracking Algorithm, Recursive TopClassic, TopLiked ↗Hard - 150. Magnet Puzzle
Backtracking, Matrix Recursive ↗Hard - 151. Find all paths from the first cell to the last cell of a matrix
Backtracking, Matrix Amazon, Recursive ↗Medium - 152. Print all shortest routes in a rectangular grid
Backtracking, Matrix Recursive ↗Medium - 153. Find all distinct combinations of a given length with repetition allowed
Array, Backtracking, Sorting Recursive ↗Medium - 154. Print all combinations of numbers from 1 to
n
having sumn
Array, Backtracking Recursive TopLiked ↗Medium - 155. Print all triplets in an array with a sum less than or equal to a given number
Array, Backtracking, Sorting ↗Medium - 156. Check if a string is a rotated palindrome or not
String Recursive ↗Medium - 157. Longest Palindromic Substring Problem
String Algorithm, Microsoft TopClassic, TopLiked ↗Medium - 158. Check if a repeated subsequence is present in a string or not
String Hashing, Recursive ↗Hard - 159. Check if strings can be derived from each other by circularly rotating them
String ↗Easy - 160. Check if a set of moves is circular or not
String Amazon ↗Medium - 161. Convert a number into a corresponding excel column name
String Amazon, Microsoft ↗Medium - 162. Convert column name in Excel to the corresponding number
String Easy - 163. Find all interleaving of given strings
String Recursive ↗Easy - 164. Isomorphic Strings
String Hashing ↗Medium - 165. Remove all extra spaces from a string
String Medium - 166. Find all possible palindromic substrings of a string
String TopLiked ↗Hard - 167. Find all possible combinations of words formed from the mobile keypad
String Amazon, Recursive TopLiked ↗Hard - 168. Find all combinations by replacing given digits with corresponding list characters
Backtracking, String Hashing, Recursive ↗Hard - 169. Find all words that follow the same order of characters as given pattern
String Amazon, Hashing ↗Medium - 170. Group anagrams together from a list of words
Sorting, String Hashing, Microsoft ↗Medium - 171. Find minimum operations required to transform a string into another string
Sorting, String Hashing ↗Hard - 172. Determine whether a string can be transformed into another string in a single edit
String ↗Medium - 173. Remove all occurrences of
AB
andC
from a stringString ↗Easy - 174. Find the longest even-length palindromic sum substring of a string
String ↗Medium - 175. Print string in the zigzag form in
k
rowsString ↗Medium - 176. Run Length Encoding (RLE) Data Compression Algorithm
String Algorithm, Amazon, Microsoft, Must Know ↗Easy - 177. Find the longest substring of a string containing
k
distinct charactersString Hashing, Sliding Window ↗Hard - 178. Find all palindromic permutations of a string
Sorting, String Hashing ↗Medium - 179. Find all substrings of a string that are a permutation of another string
String Hashing, Microsoft, Sliding Window ↗Medium - 180. Find the longest substring of a string containing distinct characters
String Amazon, Microsoft, Sliding Window ↗Medium - 181. Find all permutations of a string – C++, Java, Python
Backtracking, String Amazon, Must Know, Recursive ↗Hard - 182. Iterative approach to finding permutations of a string
Java, Sorting, String ↗Hard - 183. Find all lexicographically next permutations of a string
Sorting, String Amazon, Microsoft ↗Hard - 184. Lexicographically Minimal String Rotation
String Algorithm ↗Medium - 185. Find all strings of a given length containing balanced parentheses
String Recursive ↗Medium - 186. Find all combinations of non-overlapping substrings of a string
Backtracking, String Amazon, Recursive ↗Medium - 187. Determine whether a string is a palindrome or not
Basic, String Recursive ↗Easy - 188. Find the minimum number of inversions needed to make an expression balanced
String ↗Medium - 189. Construct the longest palindrome by shuffling or deleting characters from a string
String Hashing ↗Medium - 190. Print all combinations of phrases formed by picking words from each of the given lists
String Recursive ↗Medium - 191. Break a string into all possible combinations of non-overlapping substrings
String Recursive Medium - 192. Convert a Roman numeral to an Integer
String Easy - 193. Remove adjacent duplicate characters from a string
String Recursive ↗Easy - 194. Find the first non-repeating character in a string by doing only one traversal of it
String Hashing ↗Medium - 195. Find all n-digit strictly increasing numbers (Bottom-up and Top-down approach)
String Recursive ↗Medium - 196. Find all n-digit binary numbers having more 1’s than 0’s for any prefix
String Recursive ↗Medium - 197. Find all n-digit numbers with a given sum of digits
String Recursive ↗Hard - 198. Find all n-digit binary numbers with k-bits set where
k
ranges from 1 ton
String ↗Hard - 199. Find all n-digit binary numbers with an equal sum of bits in their two halves
String Recursive ↗Hard - 200. Find all n-digit numbers with equal sum of digits at even and odd indices
Backtracking, String Recursive ↗Hard - 201. Find all lexicographic permutations of a string
Sorting, String Recursive ↗Hard - 202. Determine if a string is a subsequence of another string
String Easy - 203. Find all lexicographically previous permutations of a string
String Hard - 204. Replace all non-overlapping occurrences of a pattern
String Medium - 205. Find all substrings containing exactly
k
distinct charactersString Hashing ↗Medium - 206. Introduction to Pattern Matching
String Must Know ↗Beginner - 207. KMP Algorithm
C, C++, Java, String Algorithm, Must Know TopAlgo ↗Hard - 208. Reverse a string using recursion
Basic, String Recursive Easy - 209. Determine whether the characters of a string follow a specified order or not
String ↗Medium - 210. Check if a sentence is syntactically correct or not
String Medium - 211. Check a string for repeated substrings
String Easy - 212. Find difference between two strings
String Easy - 213. Construct smallest number after removing k digits from a string
String Medium - 214. Number to word conversion
C++, Java, Python, String Microsoft, Recursive ↗Hard - 215. Find all occurrences of the given string in a character matrix
Backtracking, Matrix, String Depth-First Search, Recursive ↗Hard - 216. Shortest Superstring Problem
String Greedy Hard - 217. Find the shortest route in a device to construct a given string
Matrix, String Medium - 218. Find the minimum number possible by doing at-most
k
swapsBacktracking, String Recursive ↗Medium - 219. Determine whether a string matches with a given pattern
Backtracking, String Hashing, Recursive ↗Hard - 220. Difference between Subarray, Subsequence, and Subset
Array, Basic, String Must Know Beginner - 221. Determine whether two strings are anagram or not
String Hashing ↗Easy - 222. Bit Hacks – Part 1 (Basic)
Bit Manipulation Easy - 223. Bit Hacks – Part 2 (Playing with k’th bit)
Bit Manipulation Easy - 224. Bit Hacks – Part 3 (Playing with the rightmost set bit of a number)
Bit Manipulation Easy - 225. Bit Hacks – Part 4 (Playing with letters of the English alphabet)
Bit Manipulation Easy - 226. Bit Hacks – Part 5 (Find the absolute value of an integer without branching)
Bit Manipulation Easy - 227. Find the total number of bits needed to be flipped
Bit Manipulation ↗Easy - 228. Brian Kernighan’s Algorithm to count set bits in an integer
Bit Manipulation Algorithm, Amazon ↗Easy - 229. Round up to the next highest power of 2
Bit Manipulation ↗Medium - 230. Round up to the previous power of 2
Bit Manipulation ↗Medium - 231. Compute the parity of a number using a lookup table
Bit Manipulation ↗Hard - 232. Count set bits using a lookup table
Bit Manipulation Amazon ↗Hard - 233. Multiply 16-bit integers using an 8-bit multiplier
Bit Manipulation Medium - 234. Swap two bits at a given position in an integer
Bit Manipulation ↗Medium - 235. Swap individual bits at a given position in an integer
Bit Manipulation ↗Hard - 236. Check if a number is a power of 4 or not
Bit Manipulation ↗Medium - 237. Calculate hamming distance between two integers
Bit Manipulation Easy - 238. Generate an array with the set bit count of each index
Bit Manipulation Easy - 239. Reverse bits of an integer
Bit Manipulation ↗Medium - 240. Print binary representation of a number
Basic, Bit Manipulation, C, C++, Java, Python Recursive ↗Easy - 241. Add binary representation of two integers
Bit Manipulation ↗Easy - 242. Swap adjacent bits of a number
Bit Manipulation ↗Medium - 243. Check if adjacent bits are set in the binary representation of a number
Bit Manipulation ↗Easy - 244. Reverse bits of an integer using a lookup table
Bit Manipulation ↗Hard - 245. Circular shift on the binary representation of an integer by
k
positionsBit Manipulation ↗Medium - 246. Find XOR of two numbers without using the XOR operator
Bit Manipulation ↗Medium - 247. Print all distinct subsets of a given set
Array, Backtracking, Bit Manipulation, Sorting Recursive TopLiked ↗Hard - 248. Find the missing number in an array
Array, Bit Manipulation ↗Easy - 249. Find the missing number in an array without using any extra space
Array, Bit Manipulation TopLiked ↗Easy - 250. Find the odd occurring element in an array in a single traversal
Array, Bit Manipulation Hashing ↗Easy - 251. Find two odd occurring elements in an array without using any extra space
Array, Bit Manipulation Hashing ↗Medium - 252. Find all odd occurring elements in an array having a limited range of elements
Array, Bit Manipulation ↗Medium - 253. Find the duplicate element in a limited range array
Array, Bit Manipulation Amazon, Hashing, Microsoft TopLiked ↗Medium - 254. Find two duplicate elements in a limited range array (using XOR)
Array, Bit Manipulation Hashing ↗Medium - 255. Find the missing number and duplicate elements in an array
Array, Bit Manipulation ↗Medium - 256. Stack implementation using an array – C, C++, C++ (Using Templates), Java, Python
Stack Must Know ↗Beginner - 257. Check if an expression is balanced or not
Stack, String ↗Easy - 258. Find duplicate parenthesis in an expression
Stack, String Amazon ↗Medium - 259. Evaluate a postfix expression
Stack, String TopLiked ↗Easy - 260. Decode a given sequence to construct a minimum number without repeated digits
Stack, String Amazon ↗Hard - 261. Design a stack that returns the minimum element in constant time
Stack ↗Hard - 262. Design a stack that returns a minimum element without using an auxiliary stack
Stack Hard - 263. Merging Overlapping Intervals
Array, Sorting, Stack Algorithm, Amazon TopClassic ↗Medium - 264. Maximum Overlapping Intervals Problem
Array, Sorting Algorithm TopClassic ↗Medium - 265. Insert an interval by merging overlapping intervals
Array Medium - 266. Convert an infix expression into a postfix expression
Stack, String ↗Medium - 267. Implement two stacks in a single array
Stack Easy - 268. Recursive solution to sort a stack
Stack Recursive ↗Hard - 269. Reverse a stack using recursion
Stack Recursive ↗Hard - 270. Reverse a string using a stack data structure
Stack, String Recursive Easy - 271. Find the next greater element for every array element
Array, Stack ↗Medium - 272. Find the next greater element for every element in a circular array
Array, Stack ↗Hard - 273. Find the previous smaller element for each array element
Array, Stack ↗Medium - 274. Reverse an array in C++
Array, Basic, C++, Stack Recursive ↗Easy - 275. Longest Increasing Subsequence Problem
Array, Stack Algorithm, Amazon TopClassic ↗Hard - 276. Find all increasing subsequences of an array
Array, Backtracking Recursive Medium - 277. Find all elements in an array that are greater than all elements to their right
Array, Stack ↗Easy - 278. Iterative Implementation of Quicksort
Array, Divide & Conquer, Sorting, Stack ↗Medium - 279. Find all binary strings that can be formed from a wildcard pattern
Backtracking, Stack, String Recursive ↗Medium - 280. Find the length of the longest balanced parenthesis in a string
Stack, String ↗Hard - 281. Reverse text without reversing individual words
Stack, String ↗Medium - 282. Evaluate a given expression
String, Stack Hard - 283. Reverse a string without using recursion
Basic, C++, Java, Stack, String Easy - 284. Construct a string from an encoded sequence
String, Stack Hard - 285. Inorder Tree Traversal
Binary Tree, Stack Algorithm, Depth-First Search, Must Know, Recursive TopLiked ↗Medium - 286. Preorder Tree Traversal
Binary Tree, Stack Algorithm, Depth-First Search, Must Know, Recursive TopLiked ↗Medium - 287. Postorder Tree Traversal
Binary Tree, Stack Algorithm, Depth-First Search, Must Know, Recursive TopLiked ↗Medium - 288. Level order traversal of a binary tree
Binary Tree, Queue Algorithm, Amazon, Breadth-First Search, Depth-First Search, Hashing, Microsoft, Must Know, Recursive TopLiked ↗Easy - 289. Check if two binary trees are identical or not
Binary Tree, Stack Amazon, Microsoft, Recursive TopLiked ↗Easy - 290. Print bottom view of a binary tree
Binary Tree Amazon, Depth-First Search, Hashing, Recursive TopLiked ↗Medium - 291. Print top view of a binary tree
Binary Tree Depth-First Search, Hashing, Recursive TopLiked ↗Medium - 292. Calculate the height of a binary tree
Binary Tree, Queue Amazon, Breadth-First Search, Depth-First Search, Recursive ↗Easy - 293. Delete a binary tree
Binary Tree, Queue Breadth-First Search, Depth-First Search, Recursive Easy - 294. Spiral order traversal of a binary tree
Binary Tree, Queue Algorithm, Amazon, Breadth-First Search, Depth-First Search, Hashing, Microsoft, Recursive TopLiked ↗Medium - 295. Reverse level order traversal of a binary tree
Binary Tree, Queue, Stack Algorithm, Amazon, Breadth-First Search, Depth-First Search, Hashing, Microsoft, Recursive ↗Easy - 296. In-place convert a binary tree to its sum tree
Binary Tree Amazon, Depth-First Search, Microsoft, Recursive ↗Easy - 297. Determine whether the given binary tree nodes are cousins of each other
Binary Tree Depth-First Search, Recursive ↗Medium - 298. Print cousins of a given node in a binary tree
Binary Tree Depth-First Search, Recursive ↗Medium - 299. Check if a binary tree is a sum tree or not
Binary Tree Amazon, Depth-First Search, Recursive ↗Medium - 300. Combinations of words formed by replacing given numbers with corresponding alphabets
Array, Binary Tree, String Amazon, Recursive ↗Hard - 301. Determine whether a binary tree is a subtree of another binary tree
Binary Tree Depth-First Search, Recursive ↗Medium - 302. Find the diameter of a binary tree
Binary Tree Amazon, Depth-First Search, Microsoft, Recursive TopLiked ↗Medium - 303. Check if a binary tree is symmetric or not
Binary Tree Amazon, Microsoft, Recursive ↗Easy - 304. Convert a binary tree to its mirror
Binary Tree Depth-First Search, Recursive ↗Easy - 305. Determine if a binary tree can be converted to another by swapping children
Binary Tree Recursive ↗Easy - 306. Find the Lowest Common Ancestor (LCA) of two nodes in a binary tree
Binary Tree Amazon, Microsoft, Recursive TopLiked ↗Medium - 307. Print all paths from the root to leaf nodes of a binary tree
Binary Tree, Backtracking Amazon, Depth-First Search, Microsoft, Recursive ↗Easy - 308. Find ancestors of a given node in a binary tree
Binary Tree, Stack Depth-First Search, Hashing, Recursive TopLiked ↗Medium - 309. Find distance between given pairs of nodes in a binary tree
Binary Tree Amazon, Recursive ↗Hard - 310. Find the diagonal sum of a binary tree
Binary Tree Depth-First Search, Hashing, Recursive ↗Medium - 311. Sink nodes containing zero to the bottom of a binary tree
Binary Tree Depth-First Search, Recursive ↗Hard - 312. Convert a binary tree to a full tree by removing half nodes
Binary Tree Depth-First Search, Recursive ↗Medium - 313. Truncate a binary tree to remove nodes that lie on a path having a sum less than
k
Binary Tree Amazon, Depth-First Search, Recursive ↗Medium - 314. Find maximum sum root to leaf path in a binary tree
Binary Tree Amazon, Depth-First Search, Recursive ↗Medium - 315. Check if a binary tree is height-balanced or not
Binary Tree Depth-First Search, Recursive ↗Medium - 316. Convert binary tree to Left-child right-sibling binary tree
Binary Tree Depth-First Search, Recursive ↗Medium - 317. Print all paths from leaf to root node of a binary tree
Binary Tree, Backtracking Depth-First Search, Recursive ↗Medium - 318. Iteratively print the leaf to root path for every leaf node in a binary tree
Binary Tree, Stack Depth-First Search, Hashing ↗Medium - 319. Build a binary tree from a parent array
Binary Tree Amazon, Hashing, Microsoft TopLiked ↗Hard - 320. Find all nodes at a given distance from leaf nodes in a binary tree
Binary Tree Depth-First Search, Recursive ↗Hard - 321. Count all subtrees having the same value of nodes in a binary tree
Binary Tree Depth-First Search, Recursive ↗Medium - 322. Find the maximum difference between a node and its descendants in a binary tree
Binary Tree Depth-First Search, Recursive ↗Medium - 323. Find the maximum sum path between two leaves in a binary tree
Binary Tree Recursive ↗Hard - 324. Construct a binary tree from inorder and preorder traversal
Binary Tree Depth-First Search, Hashing, Recursive TopLiked ↗Hard - 325. Construct a binary tree from inorder and postorder traversals
Binary Tree Depth-First Search, Hashing, Recursive ↗Hard - 326. Construct a binary tree from inorder and level order sequence
Binary Tree Depth-First Search, Hashing, Recursive ↗Hard - 327. Construct a full binary tree from the preorder sequence with leaf node information
Binary Tree Depth-First Search, Recursive ↗Hard - 328. Construct a full binary tree from a preorder and postorder sequence
Binary Tree Depth-First Search, Hashing, Recursive ↗Hard - 329. Find postorder traversal of a binary tree from its inorder and preorder sequence
Binary Tree Depth-First Search, Hashing, Recursive ↗Medium - 330. Set next pointer to the inorder successor of all nodes in a binary tree
Binary Tree Depth-First Search, Recursive ↗Easy - 331. Find preorder traversal of a binary tree from its inorder and postorder sequence
Binary Tree, Stack Depth-First Search, Hashing, Recursive ↗Hard - 332. Find difference between sum of all nodes present at odd and even levels in a binary tree
Binary Tree Recursive ↗Easy - 333. Clone a binary tree
Binary Tree Recursive ↗Easy - 334. Clone a binary tree with random pointers
Binary Tree Depth-First Search, Hashing, Recursive ↗Hard - 335. Threaded Binary Tree – Overview and Implementation
Binary Tree Depth-First Search, Recursive ↗Medium - 336. Determine if a binary tree satisfies the height-balanced property of a red–black tree
Binary Tree Depth-First Search, Recursive ↗Medium - 337. Construct an ancestor matrix from a binary tree
Binary Tree, Matrix Depth-First Search, Recursive ↗Easy - 338. Find all possible binary trees having the same inorder traversal
Binary Tree Depth-First Search, Recursive ↗Hard - 339. Perform boundary traversal on a binary tree
Binary Tree Depth-First Search, Recursive ↗Medium - 340. Check if binary representation of a number is palindrome or not
Bit Manipulation ↗Easy - 341. Check if each node of a binary tree has exactly one child
Binary Tree Depth-First Search, Recursive ↗Easy - 342. Evaluate a Binary Expression Tree
Binary Tree Depth-First Search, Recursive ↗Easy - 343. Construction of an expression tree
Binary Tree, Stack Depth-First Search, Recursive ↗Easy - 344. Fix children-sum property in a binary tree
Binary Tree Depth-First Search, Recursive ↗Medium - 345. Maximum path sum in a binary tree
Binary Tree Algorithm, Recursive ↗Hard - 346. Create a mirror of an m–ary tree
Binary Tree Depth-First Search, Recursive Easy - 347. Print a two-dimensional view of a binary tree
Binary Tree Depth-First Search, Recursive Easy - 348. Construct a binary tree from an ancestor matrix
Binary Tree, Matrix Hashing ↗Hard - 349. Insertion in a BST
BST Algorithm, Amazon, Microsoft, Must Know, Recursive TopLiked ↗Easy - 350. Search a given key in BST
BST Algorithm, Must Know, Recursive TopLiked ↗Easy - 351. Deletion from BST (Binary Search Tree)
BST Algorithm, Amazon, Must Know, Recursive TopLiked ↗Medium - 352. Construct a balanced BST from the given keys
BST, Sorting Amazon, Recursive ↗Easy - 353. Determine whether a given binary tree is a BST or not
Binary Tree, BST Amazon, Depth-First Search, Microsoft, Recursive TopLiked ↗Medium - 354. Check if the given keys represent the same BSTs or not without building BST
BST Recursive ↗Hard - 355. Find inorder predecessor for the given key in a BST
BST Recursive ↗Medium - 356. Find the Lowest Common Ancestor (LCA) of two nodes in a BST
BST Amazon, Recursive ↗Easy - 357. Find k’th smallest node in a BST
BST Depth-First Search, Recursive ↗Easy - 358. Find k’th largest node in a BST
BST Depth-First Search, Recursive TopLiked ↗Easy - 359. Find floor and ceil in a Binary Search Tree
BST Recursive ↗Medium - 360. Convert a binary tree to BST by maintaining its original structure
BST Depth-First Search, Recursive ↗Medium - 361. Remove nodes from a BST that have keys outside a valid range
BST Depth-First Search, Recursive ↗Medium - 362. Find a pair with the given sum in a BST
BST Depth-First Search, Hashing, Recursive ↗Easy - 363. Find inorder successor for the given key in a BST
Binary Tree, BST Recursive TopLiked ↗Medium - 364. Replace every array element with the least greater element on its right
Array, BST ↗Medium - 365. Fix a binary tree that is only one swap away from becoming a BST
Binary Tree, BST Depth-First Search, Recursive ↗Hard - 366. Update every key in a BST to contain the sum of all greater keys
BST Depth-First Search, Recursive ↗Medium - 367. Check if a given sequence represents the preorder traversal of a BST
BST Depth-First Search, Recursive ↗Hard - 368. Build a Binary Search Tree from a postorder sequence
BST Depth-First Search, Recursive ↗Hard - 369. Build a Binary Search Tree from a preorder sequence
BST Depth-First Search, Recursive TopLiked ↗Hard - 370. Count subtrees in a BST whose nodes lie within a given range
BST Depth-First Search, Recursive ↗Medium - 371. Find the size of the largest BST in a binary tree
Binary Tree, BST Depth-First Search, Recursive ↗Hard - 372. Calculate sum of root to leaf digits in a binary tree
Binary Tree, Queue Recursive Medium - 373. Count paths with the given sum in a binary tree
Binary Tree Recursive, Hashing Hard - 374. Print complete Binary Search Tree (BST) in increasing order
Array, BST, Stack Depth-First Search, Recursive ↗Easy - 375. Print binary tree structure with its contents
Binary Tree, BST Recursive Medium - 376. Binary Search Algorithm
Array, Divide & Conquer Algorithm, Binary Search, Must Know, Recursive TopAlgo ↗Easy - 377. Find the number of rotations in a circularly sorted array
Array, Divide & Conquer Amazon, Binary Search, Recursive TopLiked ↗Easy - 378. Search an element in a circularly sorted array
Array, Divide & Conquer Amazon, Binary Search, Microsoft ↗Medium - 379. Find the first or last occurrence of a given number in a sorted array
Array, Divide & Conquer Binary Search TopLiked ↗Easy - 380. Count occurrences of a number in a sorted array with duplicates
Array, Divide & Conquer Binary Search TopLiked ↗Medium - 381. Find the smallest missing element from a sorted array
Array, Divide & Conquer Binary Search, Recursive ↗Medium - 382. Find floor and ceil of a number in a sorted integer array
Array, Divide & Conquer Amazon, Binary Search ↗Easy - 383. Search in a nearly sorted array in logarithmic time
Array, Divide & Conquer Binary Search ↗Medium - 384. Find the number of 1’s in a sorted binary array
Array, Divide & Conquer Binary Search, Recursive ↗Easy - 385. Find the peak element in an array
Array, Divide & Conquer Amazon, Binary Search, Recursive TopLiked ↗Medium - 386. Maximum Subarray Sum using Divide and Conquer
Array, Divide & Conquer Algorithm, Recursive TopLiked Medium - 387. Efficiently implement power function
Bit Manipulation, Divide & Conquer Recursive ↗Easy - 388. Find the missing term in a sequence in logarithmic time
Array, Divide & Conquer Binary Search ↗Medium - 389. Find floor and ceil of a number in a sorted array (Recursive solution)
Array, Divide & Conquer Amazon, Binary Search, Recursive ↗Easy - 390. Find the frequency of each element in a sorted array containing duplicates
Array, Divide & Conquer Binary Search, Hashing, Recursive ↗Easy - 391. Find the square root of a number using a binary search
Divide & Conquer Binary Search ↗Easy - 392. Division of two numbers using binary search algorithm
Divide & Conquer Amazon, Binary Search Medium - 393. Find the odd occurring element in an array in logarithmic time
Array, Bit Manipulation, Divide & Conquer, Sorting Binary Search, Recursive ↗Medium - 394. Find pairs with difference
k
in an array | Constant Space SolutionArray, Divide & Conquer, Sorting Binary Search, Hashing ↗Medium - 395. Find
k
closest elements to a given value in an arrayArray, Divide & Conquer Binary Search ↗Medium - 396. Find the maximum value of
j – i
such thatA[j] > A[i]
in an arrayArray ↗Medium - 397. Longest Common Prefix (LCP) Problem
Divide & Conquer, String Algorithm, Recursive TopClassic ↗Easy - 398. Binary Search in C++ STL and Java Collections
Array, C++, Divide & Conquer, Java Algorithm, Binary Search Beginner - 399. Ternary Search vs Binary search
Array, Divide & Conquer Algorithm, Binary Search Beginner - 400. Exponential search
Array, Divide & Conquer Algorithm, Binary Search, Recursive TopAlgo ↗Easy - 401. Unbounded Binary Search
Divide & Conquer Algorithm, Binary Search, Recursive ↗Easy - 402. Interpolation search
Array, Divide & Conquer Algorithm ↗Easy - 403. Introduction to Dynamic Programming
Dynamic Programming Bottom-up, Recursive, Top-down, Must Know Beginner - 404. Longest Common Subsequence Problem
Dynamic Programming, String Algorithm, Amazon, Bottom-up, Recursive, Top-down TopClassic, TopLiked, TopDP ↗Medium - 405. Longest Common Subsequence (LCS) | Space optimized version
Dynamic Programming, String Amazon, Bottom-up ↗Medium - 406. Longest Common Subsequence of k–sequences
Dynamic Programming, String Algorithm, Bottom-up, Recursive, Top-down ↗Medium - 407. Longest Common Subsequence | Finding all LCS
Dynamic Programming, String Amazon, Bottom-up, Recursive, Top-down ↗Hard - 408. Longest Common Substring Problem
Dynamic Programming, String Algorithm, Bottom-up TopClassic, TopLiked ↗Medium - 409. Longest Palindromic Subsequence using Dynamic Programming
Dynamic Programming, String Algorithm, Bottom-up, Microsoft, Recursive, Top-down TopClassic, TopLiked ↗Medium - 410. Longest Repeated Subsequence Problem
Dynamic Programming, String Algorithm, Bottom-up, Recursive, Top-down TopClassic, TopLiked ↗Medium - 411. Implement Diff Utility
Dynamic Programming, String Algorithm, Recursive, Bottom-up, Top-down Medium - 412. Shortest Common Supersequence Problem
Dynamic Programming, String Algorithm, Bottom-up, Recursive, Top-down TopClassic, TopLiked, TopDP ↗Medium - 413. Shortest Common Supersequence | Finding all SCS
Dynamic Programming, String Bottom-up, Recursive, Top-down ↗Hard - 414. Shortest Common Supersequence Problem using LCS
Dynamic Programming, String Recursive, Bottom-up, Top-down ↗Hard - 415. Longest Increasing Subsequence using Dynamic Programming
Array, Dynamic Programming Algorithm, Amazon, Bottom-up, Recursive, Top-down TopLiked, TopDP ↗Hard - 416. Longest Decreasing Subsequence Problem
Array, Dynamic Programming Algorithm, Bottom-up, Recursive, Top-down ↗Hard - 417. Longest Bitonic Subsequence
Array, Dynamic Programming Algorithm, Bottom-up ↗Medium - 418. Maximum Sum Increasing Subsequence Problem
Array, Dynamic Programming Algorithm, Amazon, Bottom-up, Recursive, Top-down ↗Medium - 419. The Levenshtein distance (Edit distance) Problem
Dynamic Programming, String Algorithm, Amazon, Bottom-up, Recursive, Top-down TopClassic, TopLiked, TopDP ↗Medium - 420. Find the size of the largest square submatrix of 1’s present in a binary matrix
Dynamic Programming, Matrix Amazon, Bottom-up, Recursive, Top-down TopLiked ↗Medium - 421. Matrix Chain Multiplication using Dynamic Programming
Array, Dynamic Programming, Matrix Algorithm, Bottom-up, Recursive, Top-down TopClassic, TopLiked, TopDP ↗Hard - 422. Find minimum cost to reach the last cell of a matrix from its first cell
Dynamic Programming, Matrix Bottom-up, Recursive, Top-down TopLiked ↗Medium - 423. Find the longest sequence formed by adjacent numbers in the matrix
Dynamic Programming, Matrix Recursive, Top-down ↗Medium - 424. Count the number of paths in a matrix with a given cost to reach the destination cell
Dynamic Programming, Matrix Microsoft, Recursive, Top-down ↗Medium - 425. 0–1 Knapsack Problem
Array, Dynamic Programming Algorithm, Amazon, Bottom-up, Recursive, Top-down TopClassic, TopLiked, TopDP ↗Medium - 426. Maximize the value of an expression
Array, Dynamic Programming Bottom-up ↗Hard - 427. Partition Problem using Dynamic Programming
Array, Dynamic Programming Algorithm, Bottom-up, Recursive, Top-down TopClassic, TopLiked, TopDP ↗Medium - 428. Subset Sum Problem – Dynamic Programming Solution
Array, Dynamic Programming Algorithm, Amazon, Bottom-up, Recursive, Top-down TopClassic, TopLiked ↗Medium - 429. 3–Partition Problem
Array, Dynamic Programming Algorithm, Hashing, Recursive, Top-down TopClassic, TopLiked ↗Medium - 430. Minimum Sum Partition Problem
Array, Dynamic Programming Algorithm, Amazon, Bottom-up, Recursive, Top-down TopClassic, TopLiked ↗Hard - 431. Rod Cutting Problem
Array, Dynamic Programming Algorithm, Bottom-up, Recursive, Top-down TopClassic, TopLiked, TopDP ↗Medium - 432. Maximum Product Rod Cutting
Dynamic Programming Algorithm, Bottom-up, Recursive, Top-down TopClassic ↗Medium - 433. Coin change-making problem
Array, Dynamic Programming Algorithm, Bottom-up, Recursive, Top-down TopDP ↗Medium - 434. Coin Change Problem
Array, Dynamic Programming Algorithm, Bottom-up, Recursive, Top-down TopClassic ↗Hard - 435. Total possible solutions to a linear equation of
k
variablesDynamic Programming Bottom-up, Recursive, Top-down ↗Hard - 436. Longest Alternating Subsequence Problem
Array, Dynamic Programming Algorithm, Bottom-up, Recursive, Top-down TopClassic ↗Medium - 437. Longest Alternating Subsequence Problem – II
Array, Dynamic Programming ↗Medium - 438. Count the number of times a pattern appears in a given string as a subsequence
Dynamic Programming, String Bottom-up, Recursive, Top-down ↗Hard - 439. Collect maximum points in a matrix by satisfying given constraints
Dynamic Programming, Matrix Bottom-up, Recursive, Top-down ↗Hard - 440. Find all n-digit binary numbers without any consecutive 1’s
Dynamic Programming Bottom-up, Microsoft, Recursive, Top-down ↗Easy - 441. Count total possible combinations of n-digit numbers in a mobile keypad
Dynamic Programming Amazon, Bottom-up, Recursive, Top-down ↗Medium - 442. Word Break Problem – Dynamic Programming
Dynamic Programming, String Algorithm, Amazon, Recursive, Top-down TopClassic, TopLiked, TopDP ↗Hard - 443. Determine the minimal adjustment cost of an array
Dynamic Programming Bottom-up Hard - 444. Check if a string is k–palindrome or not
Dynamic Programming, String Bottom-up, Recursive, Top-down ↗Hard - 445. Find total ways to achieve a given sum with
n
throws of dice havingk
facesDynamic Programming Recursive, Top-down ↗Medium - 446. Wildcard Pattern Matching
Dynamic Programming, String Algorithm, Amazon, Recursive, Top-down, Bottom-up TopClassic, TopLiked ↗Hard - 447. Find the number of ways to fill an
N × 4
matrix with1 × 4
tilesDynamic Programming, Matrix Bottom-up, Recursive, Top-down ↗Medium - 448. Ways to reach the bottom-right corner of a matrix with exactly
k
turns allowedDynamic Programming, Matrix Recursive ↗Hard - 449. Weighted Interval Scheduling Problem
Array, Dynamic Programming, Sorting Algorithm, Bottom-up, Recursive, Top-down TopClassic ↗Medium - 450. Box Stacking Problem
Array, Dynamic Programming, Sorting Algorithm, Bottom-up TopClassic ↗Hard - 451. Find total ways to reach n’th stair with at-most
m
stepsDynamic Programming Bottom-up, Recursive, Top-down ↗Medium - 452. Find total ways to reach the n’th stair from the bottom
Dynamic Programming Bottom-up, Recursive, Top-down ↗Medium - 453. Activity Selection Problem using Dynamic Programming
Array, Dynamic Programming, Sorting Algorithm, Bottom-up ↗Medium - 454. Find the minimum number of deletions required to convert a string into a palindrome
Dynamic Programming, String Bottom-up, Recursive, Top-down TopLiked ↗Medium - 455. Calculate the minimum cost to reach the destination city from the source city
Dynamic Programming, Matrix Bottom-up ↗Medium - 456. Pots of Gold Game Problem using Dynamic Programming
Dynamic Programming Algorithm, Amazon, Bottom-up, Recursive, Top-down TopClassic ↗Hard - 457. Find minimum cuts needed for the palindromic partition of a string
Dynamic Programming, String Bottom-up, Recursive, Top-down ↗Hard - 458. Weighted Interval Scheduling – Dynamic Programming Solution
Array, Dynamic Programming, Sorting Algorithm, Bottom-up ↗Medium - 459. Find minimum jumps required to reach the destination
Array, Dynamic Programming Bottom-up, Recursive, Top-down ↗Medium - 460. Find the probability that a person is alive after taking
n
steps on an islandDynamic Programming, Matrix Hashing, Recursive, Top-down ↗Medium - 461. Maximum Length Snake Sequence
Dynamic Programming, Matrix Algorithm ↗Medium - 462. Calculate the size of the largest plus of 1’s in a binary matrix
Dynamic Programming, Matrix Bottom-up ↗Hard - 463. Longest Increasing Subsequence using LCS
Dynamic Programming, Sorting Algorithm, Bottom-up, Recursive, Top-down ↗Medium - 464. Find maximum profit earned from at most
k
stock transactionsArray, Dynamic Programming Bottom-up ↗Hard - 465. Count all paths in a matrix from the first cell to the last cell
Dynamic Programming, Matrix Bottom-up, Recursive, Top-down ↗Easy - 466. Check if a string matches with the given wildcard pattern
Dynamic Programming, String Amazon, Recursive, Top-down, Bottom-up ↗Hard - 467. Check if a string is interleaving of two other given strings
Dynamic Programming, String Bottom-up, Recursive, Top-down ↗Medium - 468. Find all employees who directly or indirectly reports to a manager
Dynamic Programming Hashing, Microsoft, Recursive ↗Hard - 469. Find optimal cost to construct a binary search tree
BST, Dynamic Programming Bottom-up, Recursive, Top-down ↗Hard - 470. Find the maximum sum of a subsequence with no adjacent elements
Array, Dynamic Programming Bottom-up, Recursive, Top-down TopLiked ↗Medium - 471. Minimum-weight triangulation of a convex polygon
Array, Dynamic Programming Algorithm, Bottom-up, Recursive, Top-down ↗Hard - 472. Find maximum profit that can be earned by conditionally selling stocks
Array, Dynamic Programming Bottom-up, Recursive, Top-down ↗Easy - 473. Program to find n’th Fibonacci number
Basic, Dynamic Programming Recursive, Top-down, Bottom-up ↗Easy - 474. Count decodings of a given sequence of digits
Dynamic Programming Bottom-up, Recursive, Top-down ↗Medium - 475. Hat Check Problem – Counting Derangements
Dynamic Programming Algorithm, Bottom-up, Recursive, Top-down TopClassic ↗Medium - 476. Maximum Independent Set Problem
Binary Tree, Dynamic Programming Algorithm, Recursive, Top-down TopClassic ↗Medium - 477. Find the minimum number of squares that sum to a given number
Dynamic Programming Bottom-up, Recursive, Top-down ↗Medium - 478. Truncate an integer array such that
2×min
becomes more thanmax
Array, Dynamic Programming Bottom-up, Recursive, Top-down ↗Hard - 479. Longest Alternating Subarray Problem
Array, Dynamic Programming Algorithm, Bottom-up TopClassic ↗Easy - 480. Find maximum profit earned from at most two stock transactions
Array, Dynamic Programming Bottom-up ↗Hard - 481. Find ways to calculate a target from elements of the specified array
Array, Backtracking, Dynamic Programming Recursive, Top-down ↗Medium - 482. Calculate the sum of all elements in a submatrix in constant time
Dynamic Programming, Matrix Bottom-up ↗Medium - 483. Find maximum sum
K × K
submatrix in a givenM × N
matrixDynamic Programming, Matrix Bottom-up ↗Hard - 484. Find maximum sum submatrix present in a matrix
Dynamic Programming, Matrix Bottom-up TopClassic, TopLiked ↗Medium - 485. Find the length of the longest path in a matrix with consecutive characters
Dynamic Programming, Matrix Depth-First Search, Recursive ↗Medium - 486. Collect maximum value of coins in a matrix
Dynamic Programming, Matrix Recursive ↗Hard - 487. Terminology and Representations of Graphs
Graph Must Know Beginner - 488. Graph Implementation – C, C++, C++ STL, Java Collections, Python
Graph Must Know Beginner - 489. Depth First Search (DFS)
Graph, Stack Algorithm, Amazon, Depth-First Search, Must Know, Recursive TopAlgo Medium - 490. Breadth-First Search (BFS)
Graph Algorithm, Amazon, Breadth-First Search, Microsoft, Must Know, Recursive TopAlgo Medium - 491. Arrival and departure time of vertices in DFS
Graph Depth-First Search, Must Know, Recursive Easy - 492. Types of edges involved in DFS and relation between them
Graph Depth-First Search, Must Know Beginner - 493. Determine whether a graph is Bipartite using DFS
Graph Depth-First Search, Recursive ↗Medium - 494. Topological Sort Algorithm for DAG
Graph Algorithm, Amazon, Depth-First Search, Microsoft, Must Know, Recursive ↗Medium - 495. Kahn’s Topological Sort Algorithm
Graph Algorithm TopAlgo ↗Medium - 496. Transitive closure of a graph
Graph, Matrix Algorithm, Breadth-First Search, Depth-First Search, Recursive ↗Easy - 497. Determine whether an undirected graph is a tree (Acyclic Connected Graph)
Graph Depth-First Search, Recursive ↗Medium - 498. 2–Edge Connectivity in a graph
Graph Algorithm, Depth-First Search, Recursive ↗Hard - 499. 2–Vertex Connectivity in a graph
Graph Depth-First Search Hard - 500. Check if a digraph is a DAG (Directed Acyclic Graph) or not
Graph Depth-First Search, Recursive ↗Medium - 501. Disjoint–Set Data Structure (Union–Find Algorithm)
Graph Algorithm, Recursive TopAlgo Medium - 502. Check if a graph is strongly connected or not
Graph Breadth-First Search, Depth-First Search, Recursive ↗Easy - 503. Check if a graph is strongly connected or not using one DFS Traversal
Graph Depth-First Search, Recursive ↗Hard - 504. Union–Find Algorithm for cycle detection in a graph
Graph Algorithm, Amazon, Recursive ↗Medium - 505. Single-Source Shortest Paths – Bellman–Ford Algorithm
Dynamic Programming, Graph Algorithm, Bottom-up, Must Know, Recursive TopAlgo ↗Medium - 506. All-Pairs Shortest Paths – Floyd Warshall Algorithm
Dynamic Programming, Graph, Matrix Algorithm, Bottom-up, Must Know, Recursive TopAlgo ↗Easy - 507. Find the cost of the shortest path in DAG using one pass of Bellman–Ford
Graph Depth-First Search, Recursive ↗Medium - 508. Determine a negative-weight cycle in a graph
Dynamic Programming, Graph, Matrix ↗Medium - 509. Find all Possible Topological Orderings of a DAG
Backtracking, Graph Recursive ↗Hard - 510. Find correct order of alphabets in a given dictionary of ancient origin
Graph, String Depth-First Search, Hashing, Recursive Hard - 511. Find the longest path in a Directed Acyclic Graph (DAG)
Graph Depth-First Search, Recursive ↗Hard - 512. Print all k–colorable configurations of a graph (Vertex coloring of a graph)
Backtracking, Graph Algorithm, Recursive ↗Medium - 513. Print all Hamiltonian paths present in a graph
Backtracking, Graph Recursive ↗Hard - 514. Graph Coloring Problem
Graph Algorithm, Greedy, Hashing TopClassic Medium - 515. Kruskal’s Algorithm for finding Minimum Spanning Tree
Graph, Sorting Algorithm, Amazon, Greedy, Must Know, Recursive TopAlgo ↗Hard - 516. Eulerian cycle in directed graphs
Graph Algorithm, Depth-First Search, Recursive ↗Hard - 517. Find root vertex of a graph
Graph Breadth-First Search, Depth-First Search, Recursive ↗Medium - 518. Check whether an undirected graph is Eulerian
Graph Algorithm, Depth-First Search, Recursive ↗Medium - 519. Check if a set of words can be rearranged to form a circle
Graph Depth-First Search, Recursive ↗Hard - 520. Find itinerary from the given list of departure and arrival airports
Array, Graph Hashing, Recursive ↗Easy - 521. Introduction to Priority Queues using Binary Heaps
Array, Heap Priority Queue, Must Know Beginner - 522. Min Heap and Max Heap Implementation – C++, Java
Heap Must Know Beginner - 523. Check if an array represents a min-heap or not
Array, Heap Recursive ↗Medium - 524. Convert max heap to min heap in linear time
Array, Heap Recursive ↗Easy - 525. Find k’th largest element in an array
Array, Heap Amazon, Priority Queue TopLiked ↗Medium - 526. Sort a k-sorted array
Array, Heap Priority Queue ↗Medium - 527. Merge
M
sorted lists of variable lengthArray, Heap, Sorting Amazon, Priority Queue ↗Hard - 528. Find k’th smallest element in an array
Array, Heap Priority Queue TopLiked ↗Medium - 529. Find the smallest range with at least one element from each of the given lists
Array, Heap Priority Queue ↗Hard - 530. Merge
M
sorted lists each containingN
elementsArray, Heap, Matrix, Sorting Amazon, Priority Queue Hard - 531. Find first
k
non-repeating characters in a string in a single traversalHeap, String Amazon, Hashing, Priority Queue ↗Medium - 532. Connect
n
ropes with minimal costArray, Heap Priority Queue ↗Easy - 533. Return k’th largest element in a stream
Heap Priority Queue ↗Medium - 534. Huffman Coding Compression Algorithm
Bit Manipulation, Binary Tree, Heap Algorithm, Greedy, Priority Queue TopAlgo Hard - 535. Replace each array element by its corresponding rank
Array, Heap Hashing, Priority Queue ↗Easy - 536. Single-Source Shortest Paths – Dijkstra’s Algorithm
Graph, Heap Algorithm, Greedy, Must Know, Priority Queue TopAlgo ↗Medium - 537. Construct a Cartesian tree from an inorder traversal
Binary Tree, Heap Depth-First Search, Recursive ↗Medium - 538. Treap Data Structure
BST, Heap Recursive Beginner - 539. Implementation of Treap Data Structure (Insert, Search, and Delete)
BST, Heap Recursive Hard - 540. Heap Sort Algorithm
Array, C, C++, Heap, Java, Sorting Algorithm, Must Know, Priority Queue, Recursive TopAlgo ↗Medium - 541. Introsort Algorithm – Overview and C++ Implementation
Array, Divide & Conquer, Heap, Sorting Algorithm, Priority Queue, Recursive ↗Hard - 542. External Merge Sort Algorithm
Array, Heap, Sorting Algorithm, Priority Queue Hard - 543. Introduction to Linked Lists
Linked List Must Know Beginner - 544. Linked List Implementation – C, C++, Java, Python
Linked List Must Know ↗Beginner - 545. Linked List – Insertion at Tail
Linked List Must Know ↗Beginner - 546. Static Linked List
C, Linked List Beginner - 547. Clone a Linked List
Linked List Recursive ↗Easy - 548. Delete a linked list
Linked List Recursive Easy - 549. Pop operation in a linked list
Linked List ↗Easy - 550. Insert a node to its correct sorted position in a sorted linked list
Linked List Amazon TopLiked ↗Easy - 551. Rearrange linked list in increasing order (Sort linked list)
Linked List TopLiked ↗Medium - 552. Split nodes of a linked list into the front and back halves
Linked List ↗Easy - 553. Remove duplicates from a sorted linked list
Linked List Microsoft ↗Easy - 554. Move the front node of a linked list in front of another list
Linked List ↗Easy - 555. Move even nodes to the end of the linked list in reverse order
Linked List Amazon ↗Medium - 556. Split a linked list into two lists where each list contains alternating elements from it
Linked List Recursive ↗Medium - 557. Construct a linked list by merging alternate nodes of two given lists
Linked List Amazon, Recursive ↗Easy - 558. Merge two sorted linked lists into one
Linked List Amazon, Microsoft, Recursive TopLiked ↗Medium - 559. Efficiently merge
k
sorted linked listsDivide & Conquer, Heap, Linked List Priority Queue, Recursive ↗Hard - 560. Intersection of two sorted linked lists
Linked List Amazon, Microsoft ↗Medium - 561. Reverse a linked List – Iterative Solution
Linked List Microsoft, Must Know ↗Medium - 562. Reverse a Linked List – Recursive Solution
Linked List Microsoft, Must Know, Recursive ↗Hard - 563. Reverse every group of
k
nodes in a linked listLinked List Amazon, Microsoft, Recursive ↗Medium - 564. Find k’th node from the end of a linked list
Linked List Amazon, Recursive ↗Easy - 565. Merge alternate nodes of two linked lists into the first list
Linked List Recursive ↗Medium - 566. Merge two sorted linked lists from their end
Linked List, Sorting Microsoft ↗Medium - 567. Delete every
N
nodes in a linked list after skippingM
nodesLinked List Amazon, Recursive ↗Easy - 568. Rearrange linked list in a specific manner in linear time
Linked List Amazon, Recursive ↗Medium - 569. Check if a linked list is palindrome or not
Linked List Recursive TopLiked ↗Medium - 570. Move the last node to the front of a linked list
Linked List Recursive ↗Easy - 571. Rearrange linked list in a specific manner
Linked List ↗Easy - 572. Floyd’s Cycle Detection Algorithm
Linked List Algorithm, Amazon, Hashing, Microsoft, Must Know TopAlgo ↗Easy - 573. Find start node of the cycle in a linked list
Linked List Medium - 574. Sort linked list containing 0’s, 1’s, and 2’s in a single traversal
Linked List Microsoft ↗Medium - 575. Remove duplicates from a linked list in a single traversal
Linked List Hashing ↗Easy - 576. Rearrange linked list so that it has alternating high and low values
Linked List ↗Medium - 577. Rearrange a linked list by separating odd nodes from even ones
Linked List Recursive ↗Medium - 578. Calculate height of a binary tree with leaf nodes forming a circular doubly linked list
Binary Tree, Linked List Depth-First Search, Recursive ↗Medium - 579. XOR Linked List – Overview and Implementation in C/C++
Bit Manipulation, C, C++, Linked List Algorithm, Must Know Medium - 580. Recursively check if the linked list of characters is palindrome or not
Linked List Recursive ↗Medium - 581. Merge two BSTs into a doubly-linked list in sorted order
BST, Linked List Depth-First Search, Recursive ↗Hard - 582. Remove redundant nodes from a path formed by a linked list
Linked List ↗Medium - 583. Add a single-digit number to a linked list representing a number
Linked List Recursive ↗Medium - 584. Reverse every alternate group of
k
nodes in a linked listLinked List Recursive ↗Medium - 585. Determine whether a linked list is palindrome or not
Linked List Recursive ↗Medium - 586. Reverse a doubly linked list
Linked List Recursive ↗Easy - 587. Pairwise swap adjacent nodes of a linked list
Linked List Recursive ↗Medium - 588. Flatten a Linked List
Linked List Recursive Hard - 589. Check if a linked list of strings is palindromic
Linked List, String Recursive ↗Easy - 590. Flatten a multilevel linked list
Linked List Recursive Medium - 591. Construct a height-balanced BST from an unbalanced BST
BST, Linked List Depth-First Search, Recursive ↗Hard - 592. Swap k’th node from beginning with k’th node from the end in a linked list
Linked List ↗Medium - 593. Add two linked lists without using any extra space
Linked List ↗Medium - 594. Remove all nodes from a linked list that matches a given key
Linked List Recursive Easy - 595. Clone a linked list with random pointer
Linked List Hashing, Recursive ↗Hard - 596. Update random pointer for each linked list node to point to the maximum node
Linked List Recursive ↗Medium - 597. Link nodes present in each level of a binary tree in the form of a linked list
Binary Tree, Linked List Depth-First Search, Hashing, Recursive ↗Hard - 598. Convert a ternary tree to a doubly-linked list
Binary Tree, Linked List Recursive ↗Medium - 599. Construct a height-balanced BST from a sorted doubly linked list
BST, Linked List Depth-First Search, Recursive ↗Hard - 600. In-place merge two sorted linked lists without modifying links of the first list
Linked List ↗Medium - 601. Reverse specified portion of a linked list
Linked List ↗Medium - 602. Find the intersection point of two linked lists
Linked List Hashing ↗Medium - 603. Extract leaves of a binary tree into a doubly-linked list
Binary Tree, Linked List Depth-First Search, Recursive ↗Medium - 604. Find the vertical sum of a binary tree
Binary Tree, Linked List Depth-First Search, Hashing, Recursive ↗Hard - 605. In-place convert a binary tree to a doubly-linked list
Binary Tree, Linked List Amazon, Depth-First Search, Microsoft, Recursive ↗Hard - 606. Find a triplet with the given sum in a BST
BST, Linked List Depth-First Search, Recursive ↗Hard - 607. Check whether the leaf traversal of given binary trees is the same or not
Binary Tree, Linked List, Stack Depth-First Search, Recursive ↗Hard - 608. Merge sort algorithm for a singly linked list
Divide & Conquer, Linked List, Sorting Algorithm, Recursive ↗Hard - 609. Sort a doubly-linked list using merge sort
Divide & Conquer, Linked List, Sorting Recursive ↗Medium - 610. Stack Implementation using a Linked List
Basic, Linked List, Stack ↗Beginner - 611. Clock Angle Problem
Programming Puzzles Algorithm, Amazon TopAlgo ↗Easy - 612. Add two numbers without using the addition operator | 5 methods
Programming Puzzles Easy - 613. Generate the power set of a given set
Array, Backtracking, Bit Manipulation Amazon, Recursive ↗Medium - 614. Implement power function without using multiplication and division operators
Programming Puzzles Recursive Easy - 615. Print all numbers between 1 to N without using a semicolon
Programming Puzzles Recursive Medium - 616. Swap two numbers without using a third variable | 5 methods
Bit Manipulation, Programming Puzzles Easy - 617. Determine the if condition to print the specific output
Programming Puzzles Recursive Easy - 618. Find maximum and minimum value of a triplet without using a conditional statement
Programming Puzzles Medium - 619. Find numbers represented as the sum of two cubes for two different pairs
Programming Puzzles Hashing ↗Medium - 620. Print “Hello World” with empty main function | 3 methods
Programming Puzzles Medium - 621. Tower of Hanoi Problem
Programming Puzzles Algorithm, Recursive ↗Medium - 622. Print all numbers between 1 to N without using any loop | 4 methods
Programming Puzzles Recursive Easy - 623. Print a semicolon without using a semicolon anywhere in the program
Programming Puzzles Easy - 624. Multiply two numbers without using a multiplication operator or loops
Programming Puzzles Recursive Easy - 625. Find the square of a number without using the multiplication and division operator
Bit Manipulation, Divide & Conquer, Programming Puzzles Easy - 626. Check if a number is even or odd without using any conditional statement
Programming Puzzles Easy - 627. Set both elements of a binary array to 0 in a single line
Array, Programming Puzzles Easy - 628. Find minimum number without using conditional statement or ternary operator
Programming Puzzles Recursive Medium - 629. Perform division of two numbers without using division operator
Bit Manipulation, Programming Puzzles Recursive Medium - 630. Generate 0 and 1 with 75% and 25% probability
Bit Manipulation, C, Programming Puzzles ↗Medium - 631. Generate desired random numbers with equal probability
C, Programming Puzzles ↗Medium - 632. Return 0, 1, and 2 with equal probability using a specified function
C, Programming Puzzles ↗Medium - 633. Generate numbers from 1 to 7 with equal probability using a specified function
C, Programming Puzzles ↗Hard - 634. Get 0 and 1 with equal probability using a specified function
C, Programming Puzzles ↗Medium - 635. Generate random input from an array according to given probabilities
Array, Programming Puzzles ↗Medium - 636. Generate fair results from a biased coin
Programming Puzzles ↗Hard - 637. Implement ternary operator without using conditional expressions
C, Programming Puzzles Medium - 638. Determine if two integers are equal without using comparison and arithmetic operators
Bit Manipulation, C, Programming Puzzles Hashing Easy - 639. Compute modulus division without division and modulo operator
Bit Manipulation, Programming Puzzles Easy - 640. Write a C/C++ program without using the main function
C, C++, Programming Puzzles Easy - 641. Single line expressions to swap two integers in Java
Bit Manipulation, Java, Programming Puzzles Easy - 642. Find maximum number without using conditional statement or ternary operator
Programming Puzzles Recursive Easy - 643. Find minimum or maximum of two integers without using branching
Bit Manipulation, Programming Puzzles Hard - 644. Solve a given set of problems without using multiplication or division operators
Bit Manipulation, Programming Puzzles Medium - 645. Queue implementation using an array – C, C++, C++ (Using Templates), Java, Python
Queue Must Know ↗Beginner - 646. Queue Implementation using a Linked List
Basic, Linked List, Queue ↗Beginner - 647. Implement a stack using the queue data structure
Queue, Stack Recursive Medium - 648. Implement a queue using the stack data structure
Queue, Stack Recursive Medium - 649. Efficiently print all nodes between two given levels in a binary tree
Binary Tree, Queue Breadth-First Search, Depth-First Search, Hashing, Recursive ↗Easy - 650. Chess Knight Problem | Find the shortest path from source to destination
Matrix, Queue Algorithm, Breadth-First Search TopClassic, TopLiked ↗Hard - 651. Shortest path in a maze – Lee Algorithm
Matrix, Queue Algorithm, Breadth-First Search, Maze, Must Know TopAlgo Medium - 652. Find the shortest safe route in a field with sensors present
Matrix, Queue Breadth-First Search, Maze ↗Hard - 653. Flood Fill Algorithm
Matrix, Queue Algorithm, Breadth-First Search, Depth-First Search, Must Know, Recursive TopAlgo ↗Medium - 654. Count number of islands
Matrix, Queue Amazon, Breadth-First Search TopLiked ↗Medium - 655. Find shortest path from source to destination in a matrix that satisfies given constraints
Matrix, Queue Breadth-First Search, Maze, Recursive TopLiked ↗Hard - 656. Generate binary numbers between 1 to
n
using a queueBit Manipulation, Queue, String Amazon ↗Easy - 657. Print nodes of a binary tree in vertical order
Binary Tree, Linked List, Queue Breadth-First Search, Depth-First Search, Recursive ↗Medium - 658. Print all nodes of a perfect binary tree in a specific order
Binary Tree, Queue Breadth-First Search, Hashing ↗Hard - 659. Print left view of a binary tree
Binary Tree, Queue Amazon, Breadth-First Search, Depth-First Search, Hashing, Recursive TopLiked ↗Easy - 660. Find the next node at the same level as the given node in a binary tree
Binary Tree, Queue Amazon, Breadth-First Search, Depth-First Search, Microsoft, Recursive ↗Medium - 661. Check if a binary tree is a complete binary tree or not
Binary Tree, Queue Breadth-First Search, Recursive TopLiked ↗Medium - 662. Print diagonal traversal of a binary tree
Binary Tree, Queue Amazon, Breadth-First Search, Depth-First Search, Hashing, Recursive ↗Medium - 663. Print corner nodes of every level in a binary tree
Binary Tree, Queue Amazon, Breadth-First Search ↗Easy - 664. Invert Binary Tree
Binary Tree, Queue, Stack Breadth-First Search, Depth-First Search, Recursive ↗Easy - 665. Find minimum passes required to convert all negative values in a matrix
Matrix, Queue Breadth-First Search, Recursive ↗Hard - 666. Convert a binary tree into a doubly-linked list in spiral order
Binary Tree, Linked List, Queue Breadth-First Search, Depth-First Search, Hashing, Recursive ↗Hard - 667. Check if a binary tree is a min-heap or not
Binary Tree, Heap, Queue Breadth-First Search, Depth-First Search, Recursive ↗Medium - 668. Invert alternate levels of a perfect binary tree
Binary Tree, Queue, Stack Breadth-First Search, Depth-First Search, Recursive ↗Hard - 669. Convert a Binary Search Tree into a Min Heap
BST, Heap, Linked List, Queue Depth-First Search, Recursive ↗Hard - 670. Snake and Ladder Problem
Graph, Queue Algorithm, Breadth-First Search TopClassic, TopLiked ↗Hard - 671. Find the shortest distance of every cell from a landmine inside a maze
Matrix, Queue Breadth-First Search, Maze ↗Hard - 672. Convert a multilevel linked list to a singly linked list
Linked List, Queue Medium - 673. Check if an undirected graph contains a cycle or not
Graph, Queue Amazon, Breadth-First Search, Depth-First Search, Recursive TopLiked ↗Medium - 674. Find maximum cost path in a graph from a given source to a given destination
Graph, Queue Breadth-First Search TopLiked ↗Medium - 675. Total paths in a digraph from a given source to a destination having exactly
m
edgesGraph, Queue Breadth-First Search ↗Medium - 676. Least cost path in a digraph from a given source to a destination having
m
edgesGraph, Queue Breadth-First Search ↗Medium - 677. Traverse a given directory using BFS and DFS in Java
Java, Queue Breadth-First Search, Depth-First Search, Recursive Easy - 678. Perform vertical traversal of a binary tree
Binary Tree, Queue Amazon, Breadth-First Search, Depth-First Search, Hashing, Recursive ↗Medium - 679. Compute the maximum number of nodes at any level in a binary tree
Binary Tree, Queue Breadth-First Search, Depth-First Search, Hashing, Recursive ↗Easy - 680. Print right view of a binary tree
Binary Tree, Queue Breadth-First Search, Depth-First Search, Hashing, Recursive ↗Medium - 681. Find the minimum depth of a binary tree
Binary Tree, Queue Breadth-First Search, Depth-First Search, Recursive ↗Easy - 682. Depth-First Search (DFS) vs Breadth-First Search (BFS)
Binary Tree, Graph, Queue, Stack Algorithm, Breadth-First Search, Depth-First Search, Must Know Beginner - 683. Bipartite Graph
Graph, Queue Algorithm, Breadth-First Search TopLiked ↗Medium - 684. Compute the least cost path in a weighted digraph using BFS
Graph, Queue Breadth-First Search, Recursive ↗Medium - 685. Find the path between given vertices in a directed graph
Backtracking, Graph, Queue Breadth-First Search, Depth-First Search, Recursive ↗Easy - 686. Construct a directed graph from an undirected graph that satisfies given constraints
Graph, Queue Breadth-First Search, Depth-First Search Medium - 687. Trie Implementation – C, C++, C++ (Memory Efficient), Java, Python
Trie Beginner - 688. Longest Common Prefix in a given set of strings (using Trie)
String, Trie Trie ↗Medium - 689. Lexicographic sorting of a given set of keys
Sorting, String, Trie Depth-First Search, Recursive, Trie ↗Medium - 690. Lexicographic rank of a string
String ↗Hard - 691. Find the maximum occurring word in a given set of strings
String, Trie Depth-First Search, Recursive, Trie ↗Easy - 692. Find first
k
maximum occurring words in a given set of stringsHeap, String, Trie Depth-First Search, Priority Queue, Recursive, Trie Medium - 693. Find duplicate rows in a binary matrix
Matrix, Trie Amazon, Hashing, Trie ↗Medium - 694. Word Break Problem – Using Trie Data Structure
Dynamic Programming, String, Trie Amazon, Bottom-up, Recursive, Trie ↗Medium - 695. Generate a list of possible words from a character matrix
Backtracking, Matrix, Trie Depth-First Search, Hashing, Recursive, Trie ↗Hard - 696. Find all words matching a pattern in the given dictionary
String, Trie Recursive, Trie ↗Medium - 697. Find the shortest unique prefix for every word in an array
String, Trie Depth-First Search, Recursive, Trie ↗Medium - 698. Remove loop from a linked list
Linked List Hashing ↗Medium - 699. Find number of customers who could not get any computer
String ↗Easy - 700. Find the smallest missing positive number from an unsorted array
Array Hashing ↗Medium - 701. Print all pairs of anagrams in a set of strings
Sorting, String, Trie Depth-First Search, Recursive ↗Medium - 702. Find total arrangements such that no two balls of the same color are together
Dynamic Programming Recursive, Top-down ↗Hard - 703. Determine whether a BST is skewed from its preorder traversal
Array, BST ↗Easy - 704. Determine whether two nodes lie on the same path in a binary tree
Binary Tree Depth-First Search, Recursive ↗Medium - 705. Find height of a binary tree represented by the parent array
Array, Binary Tree, Dynamic Programming Bottom-up, Recursive, Top-down ↗Medium - 706. In-place merge two height-balanced BSTs
BST, Linked List Depth-First Search, Recursive ↗Hard - 707. Check if removing an edge can split a binary tree into two equal size trees
Binary Tree Depth-First Search, Recursive ↗Easy - 708. Find read-write conflicts among given database transactions
Array, Sorting ↗Medium - 709. Construct a complete binary tree from its linked list representation
Binary Tree, Linked List, Queue Recursive ↗Easy - 710. Find the minimum number of merge operations to make an array palindrome
Array ↗Medium - 711. Check whether a directed graph is Eulerian
Graph Depth-First Search ↗Medium - 712. Count nodes in a BST that lies within a given range
BST Depth-First Search, Recursive ↗Easy - 713. Check if a number is a power of 8 or not
Bit Manipulation ↗Medium - 714. Check if a number is a perfect square
Divide & Conquer, Programming Puzzles Algorithm, Binary Search Easy - 715. Shrink an array by removing triplets that satisfy given constraints
Array, Dynamic Programming Recursive, Top-down ↗Hard - 716. Count distinct permutations of an array that sums to a target
Array, Dynamic Programming Recursive Medium - 717. Check if a string can be constructed from another string
String Easy - 718. Check children-sum property in a binary tree
Binary Tree Depth-First Search, Recursive ↗Easy
Thanks for reading.
To share your code in the comments, please use our online compiler that supports C, C++, Java, Python, JavaScript, C#, PHP, and many more popular programming languages.
Like us? Refer us to your friends and support our growth. Happy coding :)
104 Comments
Most Voted