프린터1 [프로그래머스] 프린터 (42587)(Kotlin) 원본 문제 : https://programmers.co.kr/learn/courses/30/lessons/42587?language=kotlin import java.util.* data class Doc (val priority: Int, val idx: Int) class Solution { fun solution(priorities: IntArray, location: Int): Int { var answer = 1 val printList: LinkedList = LinkedList() for ( i in priorities.indices) printList.add(Doc(priorities[i], i)) while(printList.size > 1) { val firstDoc: Doc = pri.. 2020. 1. 13. 이전 1 다음