Hacker Timesnew | past | comments | ask | show | jobs | submitlogin

You always either go left or down so total 40 steps, choose 20 to be down (or 20 to be right)


Which 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!)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: