657-Robot-Return-To-Origin

Sat 17 May 2025

https://leetcode.com/problems/robot-return-to-origin

import pyutil as pyu
pyu.get_local_pyinfo()
print(pyu.ps2("python-dotenv"))
from typing import List
class Solution:
  def judgeCircle(self, moves: str) -> bool:
    return moves.count('R') == moves.count('L') and moves.count('U') == moves.count('D')
new Solution().judgeCircle()

Score: 5

Category: leetcode