Coding problems

Coding Problems

Implement one function, run it against the worked examples, then submit it against the hidden cases. The same algorithms the tutorials walk through, with somewhere to actually type them.

0 / 15 solved

Showing 1–15 of 15

TitleDifficulty

1. Two Sum

Find the two numbers in a sorted array that add up to a target.

Easy

2. Count Vowels

Count how many characters of a string are vowels.

Easy

3. Move Zeroes

Shift every zero to the end while keeping the other values in order.

Easy

4. Count Set Bits

For each number, count the 1 bits in its binary representation.

Easy

5. Maximum Subarray Sum

Find the largest sum obtainable from any contiguous run of values.

Easy

6. Climbing Stairs

Count the distinct ways to climb n steps taking one or two at a time.

Med.

7. Connected Components

Group the nodes of an undirected graph into its connected components.

Med.

8. Merge Intervals

Collapse a list of intervals so no two of them overlap.

Med.

9. Coin Change

Find the fewest coins that add up to a target amount.

Med.

10. Group Anagrams

Cluster words that are rearrangements of each other.

Med.

11. Course Schedule

Decide whether a set of prerequisites can be satisfied at all.

Med.

12. Longest Increasing Subsequence

Find the longest strictly increasing subsequence, which need not be contiguous.

Hard

13. Sliding Window Maximum

Report the largest value in every window of fixed width as it slides.

Hard

14. Edit Distance

Count the fewest single-character edits that turn one word into another.

Hard

15. Median of Two Sorted Arrays

Find the median of two sorted arrays without merging them.

Exp.