[프로그래머스] 배달 - Java
https://programmers.co.kr/learn/courses/30/lessons/12978 코딩테스트 연습 - 배달 5 [[1,2,1],[2,3,3],[5,2,2],[1,4,2],[5,3,1],[5,4,2]] 3 4 6 [[1,2,1],[1,3,2],[2,3,2],[3,4,3],[3,5,2],[3,5,3],[5,6,1]] 4 4 programmers.co.kr import java.util.Arrays; import java.util.Comparator; import java.util.PriorityQueue; class Solution { public int solution(int N, int[][] road, int K) { final int MAX = 1000000; int answer ..
[프로그래머스] 영어 끝말잇기 - Java
https://programmers.co.kr/learn/courses/30/lessons/12981 코딩테스트 연습 - 영어 끝말잇기 3 [tank, kick, know, wheel, land, dream, mother, robot, tank] [3,3] 5 [hello, observe, effect, take, either, recognize, encourage, ensure, establish, hang, gather, refer, reference, estimate, executive] [0,0] programmers.co.kr import java.util.HashSet; class Solution { public int[] solution(int n, String[] words) { int[]..
[프로그래머스] 지형 이동 - Java
https://programmers.co.kr/learn/courses/30/lessons/62050 코딩테스트 연습 - 지형 이동 [[1, 4, 8, 10], [5, 5, 5, 5], [10, 10, 10, 10], [10, 10, 10, 20]] 3 15 [[10, 11, 10, 11], [2, 21, 20, 10], [1, 20, 21, 11], [2, 1, 2, 1]] 1 18 programmers.co.kr import java.util.*; class Solution { class Pair { int x; int y; public Pair(int x, int y) { this.x = x; this.y = y; } } class Edge { int u, v, w; public Edge(int u..