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