📜 WAYPOINT LESSON
Checkpoint — Greedy
⭐ beginner⏳ 20 min read📍 Lesson 77 of 281
Pass the graded problem to finish the greedy module.
Checkpoint — tham lam. Pass the graded challenge below to complete the module. The fuel problem is the deferred-decision greedy: keep a max-heap of stations passed but unused; only when the next stretch is unreachable, retro- fill at the best passed station. Also handle the two honest edge answers: 0 (never needed) and −1 (a gap no tank size can bridge).
Điểm kiểm tra — tham lam. Pass bài chấm bên dưới để hoàn thành module. Bài xăng là tham lam trì hoãn quyết định: giữ max-heap các trạm đã qua-chưa-dùng; chỉ khi chặng kế không tới được mới châm hồi tố tại trạm tốt nhất. Xử lý cả hai đáp án biên: 0 (không cần) và −1 (khoảng trống vô vọng).