leet++
Practice set
Choose a problem
Practice set
- Open
Two Sum
EasyPractice trading a little extra memory for a faster search through a sequence.
- Hash map
- Array
- Open
Valid Parentheses
EasyUse a last-in-first-out structure to reason about nested delimiters.
- Stack
- String
- Open
Best Time to Buy and Sell Stock
EasyTrack a running opportunity while scanning time-ordered values once.
- Array
- Greedy
- Open
Binary Search
EasyNarrow a sorted search space by repeatedly choosing a midpoint.
- Binary search
- Array
- Open
Merge Intervals
MediumOrder ranges and combine neighboring spans when their boundaries overlap.
- Sorting
- Intervals