next permutation1 LeetCode - 31. Next Permutation - swift https://leetcode.com/problems/next-permutation/ Next Permutation - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 주어진 숫자 배열을 통해, 그다음의 순열을 찾는 문제다. 만약 다음 순열이 존재하지 않는다면, 오름차순으로 정렬된 배열로 만들고, 존재한다면 그 다음의 순열로 배열을 만든다. 조금만 고민하면, 특징을 찾을 수 있다. 다음의 순열이 되기 위해서는, 배열의 끝부분부터 탐색하면서, 현재 위치보다 -1 한.. 2021. 8. 20. 이전 1 다음