Top 50 Array Coding Problems for Interviews

Here is the collection of the Top 50 list of frequently asked interviews question on arrays. Problems in this Article is divided into three Levels so that readers can practice according to the difficulty level step by step.

Level 1

  1. Check if a key is present in every segment of size k in an array
  2. Find the minimum and maximum element in an array
  3. Write a program to reverse the array
  4. Write a program to sort the given array
  5. Find the Kth largest and Kth smallest number in an array
  6. Find the occurrence of an integer in the array
  7. Sort the array of 0s, 1s, and 2s
  8. Range and Coffiecient of array
  9. Move all the negative elements to one side of the array
  10. Find the Union and Intersection of the two sorted arrays

Level 2

  1. Write a program to cyclically rotate an array by one
  2. Find the missing integer
  3. Count Pairs with given sum
  4. Find duplicates in an array
  5. Sort an Array using Quicksort algorithm
  6. Find common elements in three sorted arrays
  7. Find the first repeating element in an array of integers
  8. Find the first non-repeating element in a given array of integers
  9. Find the largest three elements in an array Time
  10. Rearrange the array in alternating positive and negative items
  11. Find if there is any subarray with sum equal to zero
  12. Find Largest sum contiguous Subarray
  13. Find the factorial of a large number
  14. Find Maximum Product Subarray
  15. Find longest consecutive subsequence
  16. Find the minimum element in a rotated and sorted array
  17. Find all elements that appear more than N/K times
  18. GCD of given index ranges in an array
  19. Minimize the maximum difference between the heights
  20. Minimum number of Jumps to reach end
  21. Find the two repetitive elements in a given array
  22. Find a triplet that sum to a given value
  23. Construct a N*M matrix from the user input
  24. Find the row with maximum number of 1’s
  25. Print the matrix in a Spiral manner
  26. Find whether an array is a subset of another array
  27. Implement two Stacks in an array
  28. Majority Element
  29. Wave Array
  30. Trapping Rain water

Level 3

  1. Maximum Index
  2. Max sum path in two arrays
  3. Find Missing And Repeating
  4. Stock buy and sell Problem
  5. Pair with given sum in a sorted array
  6. Chocolate Distribution Problem
  7. Longest Consecutive Subsequence
  8. Print all possible combinations of r elements in a given array
  9. Coin Change Problem
  10. Longest Alternating subsequence

Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.

My Personal Notes arrow_drop_up


If you like GeeksforGeeks and would like to contribute, you can also write an article using or mail your article to See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.