[LeetCode 풀이/python] 75. Sort Colors (medium)
문제 설명: 빨강, 하양, 파랑으로 색칠된 n 개의 객체를 포함하는 배열 nums 가 주어졌을 때, 동일한 색상의 객체끼리 서로 인접하도록 이들을 제자리 방식으로 (in-place) 정렬하시오. 정렬 순서는 빨강, 하양, 파랑 순서이며, 각 색상은 정수 0, 1, 2 로 표현되어 있다. (Given an array nums with n objects colored red, white, or blue, sort them in-place so that objects of the same color are adjacent, with the colors in the order red, white, and blue. We will use the integers 0, 1, and 2 to represent the ..
2021. 2. 24.