Given a string S of length N,rearrange the letters in the string to
form a new string X which is lexicographically greater than current string(If
many answers are possible output
lexicographically smallest one). If no string exists print -1'.Input Size:
1<=N<=100000
example:
INPUT:
hello
OUTPUT:
hlelo
Answers
Answered by
0
Answer:
Uncontrolled Fishing and Over Exploitation of Marine resources by Humans are also responsible for Extinction of Aquatic & Amphibious varieties of Animals & reptiles. ...
Similar questions