Skip to content

Commit fab0fef

Browse files
committed
Runtime: 970 ms (Top 9.86%) | Memory: 20.6 MB (Top 59.47%)
1 parent 5628acd commit fab0fef

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/algorithms/W/Walking Robot Simulation/Walking Robot Simulation.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Runtime: 970 ms (Top 9.86%) | Memory: 20.6 MB (Top 59.47%)
12
class Solution:
23
def robotSim(self, commands: List[int], obstacles: List[List[int]]) -> int:
34
obs = set(tuple(o) for o in obstacles)
@@ -17,4 +18,4 @@ def robotSim(self, commands: List[int], obstacles: List[List[int]]) -> int:
1718
x += dx
1819
y += dy
1920
out = max(out, x**2 + y**2)
20-
return out
21+
return out

0 commit comments

Comments
 (0)