[Swift] 순열, 조합
·
📝 코테/꿀팁
순열 func permutation(array: [T], n: Int) { var visited = [Bool](repeating: false, count: array.count) func permutation(current: [T]) { if current.count == n { print(current) return } for i in 0..