Loading page…
A shopping app needs the cheapest prices across three sorted lists. A min-heap that holds only the front of each list gives the next smallest value in log k steps. The lecture merges lists, stops early for the kth smallest of a grid, merges a table of sums that is never built, builds a list from its own answer with three pointers, keeps the best k with a tie rule, and covers the costs and the classic mistakes.
You are building the cheapest items strip of a shopping app.