Hi,
This program will take a string as input, and find out the llexicographically greater string than the input string. If the inout string itself is the greatest string possible then it will output "no answer".
Sample Input 1: "abb"
Sample Output 1: "bab"
Sample Input 1: "bba"
Sample Output 1: "no answer" (since "bba" is the greatest string possible with these alphabets)
Hi, This program will take a string as input, and find out the llexicographically greater string than the input string. If the inout string itself is the greatest string possible then it will output "no answer". Sample Input 1: "abb" Sample Output 1: "bab" Sample Input 1: "bba" Sample Output 1: "no answer" (since "bba" is the greatest string possible with these alphabets)