This is a verified interview question from Code-with-cisco. Candidates reporting seeing this problem in recent Online Assessments (OAs) and onsite rounds. Mastering "Minimum Drone Delivery Moves with Battery Swap Stations" covers key patterns like Other.
"An autonomous drone fleet operates above a dense urban grid. Each drone must find the minimum number of moves to deliver a package from a depot to a customer location, but the drone's compact battery cannot cover the full distance. The city has placed a sparse network of automated battery-swap kiosks on rooftops. Passing over a kiosk allows the drone to instantly swap in a charged battery, but only if it has an unused swap voucher allocated by the dispatch system. Vouchers are scarce and labeled per delivery, so the drone must plan when to swap and when to push through on remaining charge. Find the minimum number of moves required to fly from the depot at (sr, sc) to the customer location at (er, ec). Each move into an adjacent open cell costs 1 step, and entering a building incurs an extra step cost. Return -1 if no feasible delivery exists."
Join thousands of developers practicing for Code-with-cisco.