Company: NXT wave_18oct
Difficulty: medium
Warehouse Exit Finder Problem Description You are managing a large warehouse with numerous aisles and blocked paths. Some paths are blocked due to maintenance work. Your task is to determine the nearest exit for a worker starting from a given position in the grid. The grid is represented by a 2D array where: # represents a free path. B represents a blocked path. The worker starts from a given position in the grid. An exit is defined as any free path that is located at the boundary of the grid. The worker can move up, down, left or right at each step. Your goal is to find the minimum number of steps required for the worker to reach an exit. If no such path exists, return -1 . Complete the provided function warehouseExitFinder that takes four arguments: m : An integer representing the number of rows in the warehouse grid. n : An integer representing the number of columns in the warehouse grid. warehouse : A 2D vector (grid) of characters where # represents open paths and B represents blo