Bloomberg SDE Video Interview: Finding Shortest Path in 2D Grid
Question Details
I urgently need some points to view other posts, so I'm sharing my Flower Castle VO1 from a few days ago. The question used a 2D character array to represent a desert, with one element "c" representin
Full Details
I urgently need some points to view other posts, so I'm sharing my Flower Castle VO1 from a few days ago. The question used a 2D character array to represent a desert, with one element "c" representing a car and one element "o" representing an oasis. The goal was to find the shortest number of steps from the car to the oasis. You just need to write the code; you don't need to execute it.
Follow-up 1: If our car only has a certain amount of fuel, and each space consumed one unit of fuel, how would you change your algorithm?
Follow-up 2: If any empty space represents a gas station with a certain amount of fuel, how would you change your algorithm? I answered both and
passed. I personally felt it wasn't too difficult, and my interviewer was very lucky.
About This Question
This is a reported interview question from a bloomberg interview for a swe role reported in 2025.
It covers the following topics: Array, Arrays, Matrix .
Difficulty rating: Hard