← All problemsSign in

Magic Box

You are given a Box pack of N magic String . Danny is quite eager to find out what is in the box so he start taking out string one by one and adding them to his backpack . but danny dont like to keep duplicate items . so if he finds that the string is already in his bag he throws it away ! calculate the weight of danny's backpack considering that each string weights 1 g . ###Input: -

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