Move Back To Origin


  • 0
    J

    A pointer is pointing at the origin position of a ruler. Each time, the pointer moves either left or right for exact 1 unit length. After n time, what's the possibility that the pointer is still pointing to the origin?
    You can assume the ruler has infinitive length and n is always an even number.


  • 0
    J

    When the pointer is pointing to the origin, it can only go Right, right?


  • 0
    J

    No, the coordinates contain negative values. So you can assume it's X axis. But what you say is actually in follow up question.


Log in to reply
 

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