Practice Questions
Here is a curated list of practice questions to test your understanding of arrays.
Try to solve these on your own before looking at the solutions! Each problem builds on the concepts from the Arrays section.
Easy
| Problem | Technique | Status |
|---|---|---|
| Two Sum | Hash Map | Available |
| Reverse the array | Two Pointers | Available |
| Find the Kth max and min element | Sorting | Available |
| Move negatives to one side | Two Pointers | Available |
| Sort 0s, 1s and 2s | Dutch National Flag | Available |
| Cyclically rotate array by one | Array Manipulation | Available |
| Union and Intersection of sorted arrays | Two Pointers | Available |
| Best time to buy and sell stock | Greedy | Available |
Medium
| Problem | Technique | Status |
|---|---|---|
| Largest sum contiguous subarray (Kadane’s) | Dynamic Programming | Available |
| Merge Intervals | Sorting + Greedy | Available |
More Practice (Coming Soon)
| Problem | Technique | Status |
|---|---|---|
| Minimise the maximum difference between heights | Sorting + Greedy | Coming Soon |
| Minimum no. of Jumps to reach end of an array | Greedy/DP | Coming Soon |
| Find duplicate in an array of N+1 Integers | Floyd’s Cycle | Coming Soon |
| Merge 2 sorted arrays without using Extra space | Two Pointers | Coming Soon |
| Next Permutation | Array Manipulation | Coming Soon |
| Count Inversions | Merge Sort | Coming Soon |
| Find all pairs whose sum equals given number | Hash Map | Coming Soon |
| Find common elements in 3 sorted arrays | Three Pointers | Coming Soon |