Your question is Sensor Data Processing and Path Optimization. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Implement a function to process sensor data or optimize a search path.
For this exercise, use the search-path interpretation. Given a rectangular grid, find the shortest path from start to goal, moving only up, down, left, or right through passable cells. Return the path as a list of coordinates, or an empty list when no path exists.
grid is a 2D list where 0 is passable and 1 is blocked. start and goal are [row, column] coordinates. Return coordinates in order from start to goal. Both endpoints are passable.
def optimize_search_path(grid, start, goal):