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:||ADA, ASM, BASH, BF, C, C99 strict, CAML, CLOJ, CLPS, CPP 4.3.2, CPP 6.3, CPP14, CS2, D, ERL, FORT, FS, GO, HASK, ICK, ICON, JAVA, JS, LISP clisp, LISP sbcl, LUA, NEM, NICE, NODEJS, PAS fpc, PAS gpc, PERL, PERL6, PHP, PIKE, PRLG, PYPY, PYTH, PYTH 3.5, RUBY, SCALA, SCM chicken, SCM guile, SCM qobi, ST, TCL, TEXT, WSPC|
Fetching successful submissions
If you are still having problems, see a sample solution here.