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.
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.
Remove the air bubbles
Sorted highest to lowest?
Return elements unique to either input
Try 1.5.4: Celsius to Fahrenheit
07 - Common functions and indexing 4
How many ways to write
Find the number of rectangles
Choose group with people
odd number odd sum
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office