[LeetCode] 31. Next Permutation - 문제풀이
주어진 배열의 순열에서 다음에 나올 순열을 찾아서 리턴하는 문제입니다. A permutation of an array of integers is an arrangement of its members into a sequence or linear order. For example, for arr = [1,2,3], the following are considered permutations of arr: [1,2,3], [1,3,2], [3,1,2], [2,3,1]. The next permutation of an array of integers is the next lexicographically greater permutation of its integer. More formally, if all the..