← All problemsSign in

Save the Gadget

Chef has got different gadgets which process ‘query’. Chef has an intuition that, if a gadget receives a ‘query’ of its name, then the gadget will get damaged. So, Chef needs a solution to save all his gadgets from getting damaged. Chef has a pool of ‘queries’. The queries are passed to a central system which decides which query goes to which gadget and the queries are processed in the order they

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