
์ค์๊ฐ ๊ตฌํ๊ธฐ / ( ๋ฐฐ์ด ์ ๋ ฌํ๊ธฐ )
ยท
Algorithm/ํ๋ก๊ทธ๋๋จธ์ค
์ค์๊ฐ์ ์ด๋ค ์ฃผ์ด์ง ๊ฐ๋ค์ ํฌ๊ธฐ์ ์์๋๋ก ์ ๋ ฌํ์ ๋ ๊ฐ์ฅ ์ค์์ ์์นํ๋ ๊ฐ์ ์๋ฏธํฉ๋๋ค. ์๋ฅผ ๋ค์ด 1, 2, 7, 10, 11์ ์ค์๊ฐ์ 7์
๋๋ค. ์ ์ ๋ฐฐ์ด array๊ฐ ๋งค๊ฐ๋ณ์๋ก ์ฃผ์ด์ง ๋, ์ค์๊ฐ์ return ํ๋๋ก solution ํจ์๋ฅผ ์์ฑํด๋ณด์ธ์. array result [1, 2, 7, 10, 11] 7 [9, -1, 0] 0 sorted : ์์๋๋ก ์ ๋ ฌ, ์ ๋ ฌ๋ ๋ฆฌ์คํธ๋ฅผ ๋ฐํ reversed : ๊ฑฐ๊พธ๋ก ๋ค์ง๊ธฐ, iterableํ ๊ฐ์ฒด๋ฅผ ๋ฐํ, ํ์ธ์ ์ํด์๋ list๋ก ํ๋ฒ ๋ ๋ณํ ํ์