이 글은 "파이썬 알고리즘 인터뷰 (박상길 지음)"을 읽고 주관적으로 요약한 글입니다. 문제 정의 n개 안에 겹치는 문자가 없도록 배열, 불가능할 경우 "idle"을 삽입하여 최소 길이 출력 책에서 구현된 코드 import collections from typing import List class Solution: def leastInterval(self, tasks: List[str], n: int) -> int: counter = collections.Counter(tasks) result = 0 while True: sub_count = 0 # 개수 순 추출 for task, _ in counter.most_common(n + 1): sub_count += 1 result += 1 counter.s..