Update Next Permutation by Kang Huang & Yan Zhao [recursion].java