Skip to content

657 Judge Route Circle

657. Judge Route Circle

题目: https://leetcode.com/problems/judge-route-circle/

难度:

Easy

class Solution(object):
    def judgeCircle(self, moves):
        """
        :type moves: str
        :rtype: bool
        """
        return moves.count('D') == moves.count('U') and moves.count('R') == moves.count('L')

我们一直在努力

apachecn/AiLearning

【布客】中文翻译组