Find the number of ways to reach n from k in an array [on hold]

We have two numbers as input: n and k (k>=2, n>=2 and k<=n). Consider that we have an array of "n" numbers which has the values 1 to n, just like this:{1,2,3,4,5,6,7,....n}. Also, consider that we have two arms: one that points at 1(the left arm), and one that points at k(the right arm). We have to find the number of distinct ways we can increase these two sides(or at least the k side) such that:

The left side(the one that starts at 1) and the right side(the one that starts...

Read More »

By: StackOverFlow - Sunday, 22 July

Related Posts