Suryanand
Resources
Sky
Emerald
Database
Home
← All DSA topics
·
System design
Arrays
20 problems in this topic. Select one to open the tabbed viewer.
Problems
1.
15. 3Sum — return unique triplets summing to zero.
2.
42. Trapping Rain Water — two pointers from both ends.
3.
11. Container With Most Water
4.
238. Product of Array Except Self — O(n), no division.
5.
56. Merge Intervals
6.
57. Insert Interval
7.
54. Spiral Matrix
8.
48. Rotate Image — 90° clockwise, in-place.
9.
73. Set Matrix Zeroes — O(1) extra using first row/col as markers.
10.
560. Subarray Sum Equals K — prefix sum + hash map.
11.
128. Longest Consecutive Sequence — O(n) set.
12.
154. Find Minimum in Rotated Sorted Array II — duplicates allowed.
13.
33. Search in Rotated Sorted Array — no duplicates.
14.
229. Majority Element II — elements appearing > n/3 times (at most two).
15.
84. Largest Rectangle in Histogram — monotonic stack.
16.
31. Next Permutation — in-place lexicographic successor.
17.
45. Jump Game II — minimum jumps to reach last index (always reachable).
18.
41. First Missing Positive — O(n) time, O(1) extra: index as hash bucket.
19.
88. Merge Sorted Array — merge nums2 into nums1 in-place.
20.
135. Candy — minimum total ratings obeying neighbors.