← All problemsSign in

Rearrange the Items

Rachel, Monica and Phoebe like rearranging food items on the table when free. You are given a series of food items. Rearrange by replacing them with other items so that no two similar items are together. There are in total N items and K type of items. Each item is represented by a different alphabet. Letter A stands for Aloo Tikki, B stands for Burger and similarly.. Your task is to obtain such

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