프로그래머스) 섬 연결하기 - 자바
package practice;import java.util.Arrays;public class Pro_섬_연결하기 { static int[] parent; public static void main(String[] args) { Solution solution = new Solution(); int n = 4; int[][] costs = {{0, 1, 1}, {0, 2, 2}, {1, 2, 5}, {1, 3, 1}, {2, 3, 8}}; System.out.println(solution.solution(n, costs)); } static class Solution{ public int solution(int n, ..
프로그래머스 게임 맵 최단거리 - 자바
package practice;import java.util.ArrayList;import java.util.LinkedList;import java.util.Queue;public class Pro_게임_맵_최단거리 { public static void main(String[] args) { Solution solution = new Solution(); int[][] arr = {{1,0,1,1,1},{1,0,1,0,1},{1,0,1,1,1},{1,1,1,0,1},{0,0,0,0,1}}; System.out.println(solution.solution(arr)); } static class Solution{ static int[][]..