Toy Story
CodeChefOpen on judge ↗
Shini has n toys on the shelf of her room. Each of her Toys have a name. When she tried to arrange them in alphabetical order, she realized that the names of all her toys start with either K,M or L. If Shini arranges all her toys in a random order (not in the alphabetical order) then find the least number of her toys that can be taken off the shelf so that no two adjacent toys have names starting
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