← All problemsSign in

Restaurant plates

Raju works in the cleaning department of a restaurant. He has a large stack of n plates, numbered from 1 to n; the topmost plate has number A1, the next plate is A2, and so on; the bottom plate has number An. All numbers are distinct. But some customers are very choosy about the plate they eat in, they want their order in a particular plate. Raju has a list of m distinct particular plates he

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