75
-
[LeetCode] 75. Sort ColorsLeetCode 2021. 10. 27. 12:02
https://leetcode.com/problems/sort-colors/ Sort Colors - 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 Sort Colors - Medium 0과 1과 2만 있는 배열 nums를 sort 라이브러리를 사용하지 않고 in-place로 정렬하는 문제다. 0의 개수와 2의 개수만 저장해놓으면 쉽게 풀이할 수 있다. 배열의 결과는 [0,0,...,0(0의 개수만큼), 1,1,...,1, 2, 2,...2(2의 개수만큼)] 와..