전체 글 822

[알고리즘] 프로그래머스 Level5 - 스마트한 프로도 (Java)

[문제 링크] : https://school.programmers.co.kr/learn/courses/30/lessons/1840 프로그래머스SW개발자를 위한 평가, 교육의 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.krimport java.util.*;class Solution { static int[] A; static int[] B; static int[] old; static int[] cur; static boolean[] inOld; static boolean[] inNew; static boolean[] check; static ArrayList sop; static ArrayList lop; ..

알고리즘 2026.08.29

[알고리즘] 프로그래머스 Level5 - 신비로운 유적 탐험 (Java)

[문제 링크] : https://school.programmers.co.kr/learn/courses/30/lessons/1834 프로그래머스SW개발자를 위한 평가, 교육의 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.krimport java.util.*;class Solution { static List[] tree1; static List[] tree2; static List[] child1; static List[] child2; static int[][] dp; public int solution(int n1, int[][] g1, int n2, int[][] g2) { tree1 = new ArrayLi..

알고리즘 2026.08.28

[알고리즘] 프로그래머스 Level5 - 빠른 이동 (Java)

[문제 링크] : https://school.programmers.co.kr/learn/courses/30/lessons/214294 프로그래머스SW개발자를 위한 평가, 교육의 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.krimport java.util.*;class Solution { static int n; static ArrayList[] graph; static int[] order; static int[] low; static int[] scc; static boolean[] onStack; static int[] stack; static int stackSize; static int orderCo..

알고리즘 2026.08.27

[알고리즘] 프로그래머스 Level5 - 집합과 쿼리 (Java)

[문제 링크] : https://school.programmers.co.kr/learn/courses/30/lessons/214291 프로그래머스SW개발자를 위한 평가, 교육의 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.krimport java.util.*;class Solution { static int[] parent; static int[] size; static int[] ids; static int[] enter; static int[] roots; static int[] left; static int[] right; static int[] priority; static int[] key; s..

알고리즘 2026.08.26

[알고리즘] 프로그래머스 Level5 - 중요한 도로 (Java)

[문제 링크] : https://school.programmers.co.kr/learn/courses/30/lessons/214293 프로그래머스SW개발자를 위한 평가, 교육의 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.krimport java.util.*;class Solution { static class Node implements Comparable { int v; long dist; Node(int v, long dist) { this.v = v; this.dist = dist; } public int compareTo(Node o) { ..

알고리즘 2026.08.25

[알고리즘] 프로그래머스 Level5 - 직사각형의 넓이 (Java)

[문제 링크] : https://school.programmers.co.kr/learn/courses/30/lessons/12974 프로그래머스SW개발자를 위한 평가, 교육의 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.krimport java.util.*;class Solution { static class Node { long x; int y1; int y2; int type; Node(long x, int y1, int y2, int type) { this.x = x; this.y1 = y1; this.y2 = y2; ..

알고리즘 2026.08.24

[알고리즘] 프로그래머스 Level5 - 재밌는 레이싱 경기장 설계하기 (Java)

[문제 링크] : https://school.programmers.co.kr/learn/courses/30/lessons/214292 프로그래머스SW개발자를 위한 평가, 교육의 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.krimport java.util.*;class Solution { public int solution(int[] heights) { Arrays.sort(heights); int n = heights.length; int mid = n / 2; if(n % 2 == 0) { int answer = Integer.MAX_VALUE; for(int..

알고리즘 2026.08.23

[알고리즘] 프로그래머스 Level5 - 문자열의 아름다움 (Java)

[문제 링크] : https://school.programmers.co.kr/learn/courses/30/lessons/68938 프로그래머스SW개발자를 위한 평가, 교육의 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.krimport java.util.*;class Solution { static int N; static char[] crr; static int[] arr; static int cnt; static long[] ct; static long[] at; static long[] rr; static long[] bt; public long solution(String s) { N = ..

알고리즘 2026.08.22

[알고리즘] 프로그래머스 Level5 - 시험장 나누기 (Java)

[문제 링크] : https://school.programmers.co.kr/learn/courses/30/lessons/81305 프로그래머스SW개발자를 위한 평가, 교육의 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.krimport java.util.*;class Solution { static int n, root; static int[] left = new int[10001]; static int[] right = new int[10001]; static int[] parent = new int[10001]; static int[] value = new int[10001]; static int count = 0; ..

알고리즘 2026.08.21