Skip to content

Latest commit

 

History

History
23 lines (14 loc) · 345 Bytes

657._Judge_Route_Circle.md

File metadata and controls

23 lines (14 loc) · 345 Bytes

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')