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
- Check if a key is present in every segment of size k in an array
- Find the minimum and maximum element in an array
- Write a program to reverse the array
- Write a program to sort the given array
- Find the Kth largest and Kth smallest number in an array
- Find the occurrence of an integer in the array
- Sort the array of 0s, 1s, and 2s
- Range and Coffiecient of array
- Move all the negative elements to one side of the array
- Find the Union and Intersection of the two sorted arrays
Level 2
- Write a program to cyclically rotate an array by one
- Find the missing integer
- Count Pairs with given sum
- Find duplicates in an array
- Sort an Array using Quicksort algorithm
- Find common elements in three sorted arrays
- Find the first repeating element in an array of integers
- Find the first non-repeating element in a given array of integers
- Find the largest three elements in an array Time
- Rearrange the array in alternating positive and negative items
- Find if there is any subarray with sum equal to zero
- Find Largest sum contiguous Subarray
- Find the factorial of a large number
- Find Maximum Product Subarray
- Find longest consecutive subsequence
- Find the minimum element in a rotated and sorted array
- Find all elements that appear more than N/K times
- GCD of given index ranges in an array
- Minimize the maximum difference between the heights
- Minimum number of Jumps to reach end
- Find the two repetitive elements in a given array
- Find a triplet that sum to a given value
- Construct a N*M matrix from the user input
- Find the row with maximum number of 1’s
- Print the matrix in a Spiral manner
- Find whether an array is a subset of another array
- Implement two Stacks in an array
- Majority Element
- Wave Array
- Trapping Rain water
Level 3
- Maximum Index
- Max sum path in two arrays
- Find Missing And Repeating
- Stock buy and sell Problem
- Pair with given sum in a sorted array
- Chocolate Distribution Problem
- Longest Consecutive Subsequence
- Print all possible combinations of r elements in a given array
- Coin Change Problem
- 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.