Amazon Interview Question

Given a number tell its nearest bigger permutation.