sam0hack / Java

Java Programs
2 stars 7 forks source link

Added a program to return a lexicographically greater string than the… #20

Closed Devishkar closed 4 years ago

Devishkar commented 4 years ago

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)