Google interview question

Parking lot with x and parking spaces, dfs/bfs