Golang Solution


  • 0
    L

    func judgeCircle(moves string) bool {
    if(strings.Count(moves, "U")!=strings.Count(moves, "D")){
    return false
    }
    if(strings.Count(moves, "L")!=strings.Count(moves, "R")){
    return false
    }
    return true
    }


Log in to reply
 

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