Okay! Let’s solve this programming problem without writing a single line of code. 🙂
A robot is located at the top-left corner of a 60 x 31 grid:
Our robot can 30 times to step down and 59 times to step right, because it is staying on the first block (1, 1).
We can write down his way from location (1, 1) to location (60, 31) like this:
R – right, D – down.
The only question is: how many different (unique) arrays we have from 59 R and 30 D?
Fill out a row with 59 R:
RRRRRRRRR……..RRRRRRRRRRRR……RRRRRRRRRR and take 30 D to random places without repeating an already existing array. On more mathematical language, number of unique arrays (unique permutations) with length 59+30 from 30 D is exactly: