[Swift] 프로그래머스 K번째수
Roel Downey
K번째수 문제 - 문제 링크: 프로그래머스 풀이 func slideArray(array: [Int], inside: Int, outside: Int) -> [Int] { var result = [Int]() var min = 0 var max = 0 if inside Int { return array[number-1] } func solution(_ array:[Int], _ commands:[[Int]]) -> [Int] { var result = [Int]() for index in 0.. [Int] { var split = [Int]() for item in origin.index(0, offsetBy: begin-1)...origin.index(0, offsetBy: end-1) { split.a..