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.

Early April, 2026

Airbnb

Senior

Early April, 2026

Airbnb

Senior

- Interviewer expected running code in 45 mins. - Had to write the entire code in the call from the input structure to output structure. - Expected to run couple of testcases.

Mid March, 2026

Airbnb

Mid-level

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