Reported interview periodNov 2025–Aug 2026
Choose the Best Transit Mode Through a Grid
A grid contains a start S, a destination D, blocked cells, and cells labeled by transit mode. A trip must use one mode for its entire route. Choose the reachable mode with the best travel time and cost.
Practice focusRequirements - Digit '1' identifies modes[0] , digit '2' identifies modes[1] , and so on. - Movement is allowed in four cardinal directions through cells of the chosen digit. - S and D may be entered for free and add neither time nor cost. - X , unrelated mode digits, and any other symbols are blocked. - For a route using mode i , each mode cell contributes times[i] and costs[i] . - Choose minimum total time, then minimum total cost, then earlier position in modes . Return "" if no mode reaches D .…