← All problemsSign in

Chef And Diwali Gift

Chef is working for a company having n employees. Since its Diwali season, so his boss decided to give gifts to all employees. The company decided on two types of surprise gifts: A and B. All A-type gifts would be distributed first and then B-type gifts. Chef wanted to be the first employee to get the B-type gift to impress his colleagues. Help Chef accomplish this task. Find the position at which

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