Jadu and his fortune telling device
CodeChefOpen on judge ↗
Jadu the famous coder of codeland wants to crack the password of MATA, the great fortune telling device which is owned by his enemy Billa. Billa being over-confident hands over a string 's' to Jadu, and challenges him to find the lexicographically smallest string considering the string is circular (i.e. the element next to the last element is the first element) and of the same length as the origin
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