All submissions for this problem are available.
Chef Neel is obsessed with large strings.On his birthday, his girlfriend Roshni buys a string S consisting of lowercase english alphabets for him. However chef likes large strings and Roshni is busy in preparations for the party. So she gives you a task to find the lexicographically largest string that can be obtained by rotation of the original string so that she could gift that to the chef.
Input: 1 lohani Output: ohanil
Example case 1.
Rotations of the string lohani are:
ohanil is the lexicographically largest among all rotations
|Time Limit:||3 sec|
|Source Limit:||50000 Bytes|
|Languages:||C, CPP14, JAVA, PYTH, PYTH 3.6, PYPY, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, NODEJS, HASK, SCALA, D, PERL, FORT, WSPC, ADA, CAML, ICK, BF, ASM, CLPS, PRLG, ICON, SCM qobi, PIKE, ST, NICE, LUA, BASH, NEM, LISP sbcl, LISP clisp, SCM guile, JS, ERL, TCL, PERL6, TEXT, SCM chicken, PYP3, CLOJ, FS|
Fetching successful submissions
If you are still having problems, see a sample solution here.