874. 行走机器人模拟 模拟 描述方向时有个技巧:int[][] dx = {{0, 1}, {1, 0}, {0, -1}, {-1, 0}}; 分别存储机器人向上.右.下.左走时,坐标应该如何变换 class Solution { public int robotSim(int[] commands, int[][] obstacles) { int max = 0; int[][] dx = {{0, 1}, {1, 0}, {0, -1}, {-1, 0}}; int k = 0; M…