← All problemsSign in

Birthday Return Gift

As the birthday day is near so Ajeet is planning to organise a party in which he is going to invite all his friends. For the party Ajeet wants to buy exactly K return gifts for his N friends. For this purpose he went to the market to buy gifts. He wants to spent as less money as possible. In the shop packets of gifts are present and the price of each packet is written. If the price of any packet

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