Day 2 - Arrays and StringsArraysPractice QuestionsProblem List

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

ProblemTechniqueStatus
Two SumHash MapAvailable
Reverse the arrayTwo PointersAvailable
Find the Kth max and min elementSortingAvailable
Move negatives to one sideTwo PointersAvailable
Sort 0s, 1s and 2sDutch National FlagAvailable
Cyclically rotate array by oneArray ManipulationAvailable
Union and Intersection of sorted arraysTwo PointersAvailable
Best time to buy and sell stockGreedyAvailable

Medium

ProblemTechniqueStatus
Largest sum contiguous subarray (Kadane’s)Dynamic ProgrammingAvailable
Merge IntervalsSorting + GreedyAvailable

More Practice (Coming Soon)

ProblemTechniqueStatus
Minimise the maximum difference between heightsSorting + GreedyComing Soon
Minimum no. of Jumps to reach end of an arrayGreedy/DPComing Soon
Find duplicate in an array of N+1 IntegersFloyd’s CycleComing Soon
Merge 2 sorted arrays without using Extra spaceTwo PointersComing Soon
Next PermutationArray ManipulationComing Soon
Count InversionsMerge SortComing Soon
Find all pairs whose sum equals given numberHash MapComing Soon
Find common elements in 3 sorted arraysThree PointersComing Soon