Police and Thieves Matching

Updated Apr 28, 2026

Short answer

Maximizing arrests by pairing police with thieves within a specific range.

Deep explanation

Medium-level greedy problems often involve sorting or priority queues. Maximizing arrests by pairing police with thieves within a specific range.

Real-world example

Merging sorted logs from multiple microservices.

Common mistakes

  • Using 0/1 Knapsack logic for Fractional Knapsack.

Follow-up questions

  • Why use a Heap?

More Greedy Algorithms interview questions

View all →