Calculate nCr in counting all possible paths problem
问题 I have a doubt in how did the author reach the intuition behind the formula to calculate the (m + n -2)C n-1 in this problem - https://www.geeksforgeeks.org/count-possible-paths-top-left-bottom-right-nxm-matrix/ Please scroll down to solution by using combinatorics. Particularly talking, I don't understand how the below code was developed for what is basically a nCr for (int i = n; i < (m + n - 1); i++) { path *= i; path /= (i - n + 1); } I mean, if I put values into it, I get it. But, if you