Рет қаралды 10,421
In this video we are solving yet another Google interview question: Robot Room Cleaner (Leetcode # 489).
This one on the surface looks easy because it's a pretty standard DFS based question until you realize that you aren't given a matrix/grid as input and instead need to work with the Robot class instead. We can apply the same principles as other grid DFS backtracking problems but we do need to be a little clever with how we actually execute the DFS.