Given two positive numbers n and k, where n>=k. In how many ways can we write n as sum of k positive numbers. Same numbers but different orders are considered different.
Example
For n=5, k=2 the answer is 4.
5 = 1 + 4 5 = 2 + 3 5 = 3 + 2 5 = 4 + 1
please correct the reference solution to com(x,k) instead of com(x)
Please correct test cases, the function should have 2 arguments.
367 Solvers
469 Solvers
Calculate the Hamming distance between two strings
144 Solvers
146 Solvers
481 Solvers