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