Chef In Debt
CodeChefOpen on judge ↗
Problem description. Chef has borrowed money from 10 people. He wants to rearrange the list of people such that he has borrowed maximum money from the first person , minimum money from the second person etc. Here is the list of people from whom Chef has borrowed money. Note: that if same amount of money has been borrowed from more than 1 person, names should be printed in the same order in 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.
Sign in to chat with the tutor and save your progress.
Sign in to start