easy Python Solution


  • 0
    W

    """
    class Solution:
    def judgeCircle(self, moves):
    """
    :type moves: str
    :rtype: bool
    """
    nd=moves.count("D")
    nu=moves.count("U")
    nl=moves.count("L")
    nr=moves.count("R")
    if nd==nu and nl==nr:
    return (True)
    else:
    return (False)
    """


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.