← All problemsSign in

Number Of Ways

John wanted to buy gifts for some k children in his apartments on christmas. He goes to the shop and the shopkeeper shows him n gifts. How many ways John can choose k gifts from n total gifts ?. Since answer could be large print the answer mod 1000000007 NOTE : ordering of the gifts do not matter Different order of same set of gifts are considered same and should not be counted as different Inpu

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start