Salesforce interview question

Lexicographically next permutation of a given string .

Salesforce Interview Question: Lexicographically next permutation of a given string . | Glassdoor