Merge two sorted arrays
Sort an array according to the order defined by another array
Find the majority element in an array
(element that appears more than βn/2β times)
Find the smallest number in an array
Find the largest number in an array
Find the second smallest and second largest element
Find the missing number in a sequence array
Find all repeating elements in an array
Find all non-repeating elements in an array
Find all symmetric pairs in an array
Find the maximum product subarray
Find the equilibrium index of an array
(index where sum of elements on the left is equal to the sum on the right)
Reverse a given array
Find the circular rotation of an array by K positions
Count the frequency of each element
Remove duplicates from a sorted array
Remove duplicates from an unsorted array
Replace each element by its rank in the array
Add an element in an array
Calculate the sum of elements
Find the average of elements
Find the median of the array
Check if an array is a subset of another array
Search for an element in an array
(generic placeholder for customized search techniques)
β
Practice these problems both iteratively and recursively (where applicable).
β
Attempt them using different data structures: Arrays, ArrayLists, HashMaps, and Sets.