Arranging teams in a programming competition
CodeChefOpen on judge ↗
You are the organizer of a very famous programming competition. There are total n students participating in it. Before the start of the competition, all participants were asked to sit in a line. The participants sat at any positions according to their choices. You are given this initial sitting of participants by a string s of size n. Each character of string s is a lower case English alphabet fro
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