4 ms·
You always either go left or down so total 40 steps, choose 20 to be down (or 20 to be right)
by shenberg 3mo ago
You always either go left or down so total 40 steps, choose 20 to be down (or 20 to be right)
- dhosek 3mo agoWhich suggests another approach to the solution; you have 20Ls and 20Rs which can appear in any order so it’s a permutation with repetition problem and thus 40!/(20!20!) That approach has the advantage that it’s easily adapted to non square rectangular grids (n+m)!/(n!m!)