Morgan Stanley Interview Question

finding next smallest permutation of a given number