Job Hiring
CodeChefOpen on judge ↗
Given a list of $N$ people, you are to choose $M$ of them in the following manner: You have to choose people in $M$ iterations and in each iteration you are to choose a person from beginning or end of list. Then you will delete that person from the list and continue the same process for $M$ iterations. You will be given the name as a single string and age as an integer of every person. The p
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.
Sign in to chat with the tutor and save your progress.
Sign in to start