← All problemsSign in

Christmas Gifts

Santa Claus is packing gifts for the children on a Christmas Eve. He can carry a maximum weight of w kilograms in his bag. He need to give n children gifts during this Christmas and the weight of the gifts are in the form of a tuple {w1, w2, w3, …. wn} and their corresponding costs are {v1, v2, v3,…. Vn}. What items should Santa select to give the costly items during the Christmas at one go? He ca

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