Box8 interview question

Next permutation of given String Leetcode