top of page

Heaps & Greedy Algorithms

12 problems · Easy to Medium · Heaps and greedy strategies

Greedy algorithms and heaps share a common theme: making locally optimal choices to achieve a globally optimal result. This track covers interval scheduling, jump game variants, and Kadane's algorithm for maximum subarray before moving into heap-based problems like K Closest Points, Median from Data Stream, and the classic Task Scheduler with Cooling Interval.

Why it matters:

Greedy problems are deceptively tricky — the hard part isn't the code, it's proving to yourself and the interviewer that the greedy choice is always safe. Interviewers use these problems to test whether you can articulate the reasoning behind an approach, not just implement it. A confident explanation of why greedy works is often more impressive than the solution itself.

01

Assign Cookies

02

Gas Station

03

Candy

04

Non-Overlapping Intervals

05

Merge Intervals

06

Jump Game

07

K Closest Points to Origin

08

Maximum Subarray - Kadane's Algorithm

09

Longest Repeating Character Replacement

10

Jump Game II

11

Find the Median from a Data Stream

12

Task Scheduler with Cooling Interval

Drop Me a Line, Let Me Know What You Think

Thanks for submitting!

© 2026 by WhiteboardReady

bottom of page