Top 40 Interview Problems on Arrays

1Minimum Copy Paste OperationsMedium
5Divide and Conquer – Rearrange array elements in special orderMedium
6Remove the duplicates from the given StringMedium
7Find median of two sorted arrays of same sizeMedium
8Find two non-repeating numbers in an array in O(n) time and O(1) spaceExpert

Which is the biggest problem of array?

The biggest limitation of array is that we need to define the size of array beforehand. This is possible only if the maximum size of array is known beforehand and may lead to memory wastage.

What is an array in C with example?

Arrays in C. An array is a variable that can store multiple values. For example, if you want to store 100 integers, you can create an array for it. int data [100];

What are the top 50 array coding problems for interview?

Top 50 Array Coding Problems for Interviews. 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.

How to sort an array in C++?

16. Write a C++ program to sort a given array of 0s, 1s and 2s. In the final array put all 0s first, then all 1s and all 2s in last. Go to the editor 17. Write a C++ program to sort (in descending order) an array of distinct elements according to absolute difference of array elements and with a given value.

How to find the ceiling of a sorted array in C?

Write a program in C to find the ceiling in a sorted array. Go to the editor N.B.: Given a sorted array in ascending order and a value x, the ceiling of x is the smallest element in array greater than or equal to x, and the floor is the greatest element smaller than or equal to x. 41.