Find Subsequence of Length K With the Largest Sum
An Easy coding interview problem in the Heap / Priority Queue pattern.
Likely pattern
Always pull the current best element in log time.
Recognition cue: Top K, K closest, running median, or repeatedly taking the smallest / largest.
- Learn first
- Do not confuse it with
Topics
- Array
- Hash Table
- Sorting
- Heap (Priority Queue)
Practise Heap / Priority Queue next
- 1Easy
- 2Easy
- 3Easy
- 4Easy
- 5Easy
- 6Easy
- 7Easy
- 8Medium