Search
⌘K

Leetcode 1298. Maximum Candies You Can Get from Boxes

Starting from given initial boxes, repeatedly open any box that is either already open or for which you have a key to collect its candies, keys, and contained boxes; the task is to maximize total candies by performing a graph traversal/queue-based exploration while dynamically unlocking new nodes (boxes) until no more can be opened.

Asked at:

Airbnb


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Mid May, 2026

Airbnb

Senior

Early May, 2026

Airbnb

Senior

Early April, 2026

Airbnb

Senior

Your account is free and you can post anonymously if you choose.