Cpp, Cplusplus, Programming, Software Development, Interview Questions.
space has an obstacle auto is_obstacle = [&grid](const Pos& pos, const Dir& dir) { return grid[pos.row+dir.row][pos.col+dir.col] == 1; }; // Helper to check whether we can step on a space // either with removing an obstacle or without auto can_step = [&grid,&search,&k](const Pos& pos, const Dir&