Arrays Interview Questions

List of problems sorted in increasing order of difficulty:

  1. Sorting Algorithm - Selection Sort
  2. Sorting Algorithm - Insertion Sort
  3. Sorting Algorithm - Bubble Sort
  4. Sorting Algorithm - Comb Sort
  5. Pancake Sorting
  6. Merge Sort
  7. Sorting Algorithm - Heap Sort
  8. 1822. Sign of the Product of an Array - IDeserve
  9. 2660. Determine the Winner of a Bowling Game
  10. Rotate an Array
  11. Fibonacci Number
  12. Merge two sorted arrays without using extra space
  13. Maximum subarray sum
  14. Maximum average subarray of size k
  15. Longest Substring with non-Repeating Characters
  16. Leaders in an array
  17. Find the missing number in the duplicate array
  18. Find Minimum Length Sub Array With Sum K
  19. Binary Search in a Sorted Array
  20. Find first index of an element in a sorted array with duplicates
  21. Find last index of an element in a sorted array with duplicates
  22. Search a sorted matrix
  23. Re-arrange elements in an array to put positive and negative elements in alternate order
  24. Number of clusters of 1s OR Number of Islands
  25. Find the next greater number using same digits
  26. Next greater element in an array
  27. First non-repeating character in a string
  28. Find the number which occurs odd number of times
  29. Find the 'n'th most frequent number in array
  30. Find the missing number in the increasing sequence
  31. Find duplicates in an integer array
  32. Find common elements in 'n' sorted arrays
  33. Find a Peak Element in an array
  34. Distribute Chocolates Problem
  35. Count frequencies of array elements in range 1 to n
  36. Find all permutations of a String
  37. Find pivot in a sorted rotated array
  38. Find an element in a sorted rotated array
  39. Find element in sorted rotated array without finding pivot
  40. Buy and sell stocks | Part 2
  41. Buy and sell stocks | Part 1
  42. 921. Minimum Add to Make Parentheses Valid
  43. 1249. Minimum Remove to Make Valid Parentheses
  44. Find index of 0 to replace to get longest continuous sequence of 1s
  45. O(n) time approach to find index of 0 to replace to get longest continuous sequence of 1s
  46. Find maximum element from each sub-array of size 'k'| Set 1
  47. Find maximum element from each sub-array of size 'k'| Set 2
  48. 1689. Partitioning Into Minimum Number Of Deci-Binary Numbers
  49. Trapping Rain Water between Towers
  50. The Skyline Problem
  51. Print a Matrix Diagonally
  52. Minimum number of coins to make change
  53. Find minimum cost path in a matrix
  54. Find maximum value of sum of index element products(i*array[i]) with only rotations allowed on a given array
  55. Maximum size square sub-matrix with all 1s
  56. Longest Subset With Consecutive Numbers
  57. Find the length of longest increasing subsequence in an array
  58. Longest Increasing Subsequence O(n logn)
  59. Find the length of longest bitonic subsequence in an array
  60. Given an array with all distinct elements, find the length of the longest sub-array which has elements(not in any particular order) that could form a contiguous sequence
  61. Find an integer array corresponding to the string specifying increase-decrease transitions
  62. Gold Mine Problem
  63. Find the Element That Appears Once in an Array
  64. Find median of two sorted arrays
  65. Find Majority Element in an Array
  66. 0-1 Knapsack Problem
  67. Count all possible decodings of a given digit sequence
  68. Find total number of ways to make change using given set of coins
  69. Find increasing sub-sequence of length three having maximum product
  70. Find increasing sub-sequence of length three having maximum product | Optimized approach
  71. Set Partition Problem | Recursion
  72. Set Partition Problem | Dynamic Programming