package
0.0.0-20241220224003-b7cf03a90b2b
Repository: https://github.com/szhou12/leetcode-go.git
Documentation: pkg.go.dev
# README
657. Robot Return to Origin
Solution idea
- 简单题. 对称相消就行了.
U
与D
对称,一对相消L
与R
对称,一对相消
Time complexity = $O(n)$
U
与 D
对称,一对相消L
与 R
对称,一对相消Time complexity = $O(n)$