알고리즘45 [Java]프로그래머스 프린터 ``` import java.util.LinkedList; import java.util.Queue; class Solution { public int solution(int[] priorities, int location) { Queue q =new LinkedList(); for(int p:priorities) { q.offer(p); } int count=0; while(!q.isEmpty()) { int item = q.poll(); boolean check = true; for(int s:q) { if(item 2019. 4. 15. [Java]프로그래머스 스킬트리 ``` class Solution { public int solution(String skill, String[] skill_trees) { int answer = 0; for(int i=0; i 2019. 4. 15. [Java] 프로그래머스 주식가격 ``` import java.util.*; class Solution { public int[] solution(int[] prices) { int len = prices.length; int[] answer = new int[len]; for(int start = 0; start 2019. 4. 15. [Java] 프로그래머스 기능개발 나의 풀이 import java.util.*; class Solution { public int[] solution(int[] progresses, int[] speeds) { int[] answer = {}; int[] daysrequired = { progresses.length }; Stack st = new Stack(); Queue q = new LinkedList(); for (int i = 0; i < progresses.length; i++) { q.add((100 - progresses[i]) / speeds[i]); } int cnt = 1; int minday = q.poll(); List list = new ArrayList(); while (!q.isEmpty()) { int nu.. 2019. 4. 15. 이전 1 ··· 8 9 10 11 12 다음 728x90