Morgan Stanley Interview Question

given a number ,find the smallest next permutation that can be formed using same digits.