1 Reverse array in-place Easy Two Pointers

You're given a list of numbers and need to flip the order without creating a new list.

O(n) time · O(1) space
2 Left rotate array by k Easy Slicing

Shift every element k positions to the left, wrapping elements from the front to the back.

O(n) time · O(1) space (in-place)
3 Max subarray sum (Kadane's) Medium Running Max

Find the consecutive chunk of numbers in an array that adds up to the largest possible sum.

O(n) time · O(1) space
4 Two sum (sorted array) Easy Two Pointers

In a sorted list, find two numbers that add up to a specific target.

O(n) time · O(1) space
5 Check palindrome string Easy Two Pointers

Check whether a word or phrase reads the same forwards and backwards.

O(n) time · O(1) space
6 Merge two sorted arrays Easy Two Pointers

Combine two already-sorted lists into a single sorted list.

O(n+m) time · O(n+m) space
7 Sliding window max sum of k elements Easy Sliding Window

Find which group of k consecutive elements in an array has the biggest total.

O(n) time · O(1) space
8 Range sum query (prefix sum) Easy Prefix Sum

Pre-process an array so you can instantly answer 'what is the sum between index l and r?'

O(n) build · O(1) per query
133 Product of Array Except Self Medium Prefix/Suffix

For each number in the array, compute the product of all the other numbers without using division.

O(n) time · O(1) space (output array not counted)