04.03 · Problem
Seat Guests With No Twin Neighbours
This problem is part of solulu Pro
Guests wear coloured badges given as a string of letters. Rearrange them in a row so that no two adjacent guests have the same badge colour. Return any valid arrangement, or an empty string if it is impossible.
Lifetime ₹2,000 ₹1,000 · Beta offer
Item 48 of 94 · updated 2026-10-12