package org.example.알고리즘.바탕화면정리; import java.util.Arrays; class Solution { public static void main(String[] args) { Solution solution = new Solution(); System.out.println(Arrays.toString(solution.solution(new String[]{ ".#...", "..#..", "...#." }))); System.out.println("================================"); System.out.println(Arrays.toString(solution.solution(new String[]{ "..........", ".....#.....
package org.example.알고리즘.혼자놀기의달인; class Solution { public static void main(String[] args) { int[] cards = {8, 6, 3, 7, 2, 5, 1, 4}; Solution solution = new Solution(); System.out.println(solution.solution(cards)); } public int solution(int[] cards) { int maxScore = 0; for (int start = 1; start
package org.example.알고리즘.합승택시요금; import java.util.Arrays; class Solution { public static void main(String[] args) { Solution solution = new Solution(); System.out.println(solution.solution(6, 4, 6, 2, new int[][]{{4, 1, 10}, {3, 5, 24}, {5, 6, 2}, {3, 1, 41}, {5, 1, 24}, {4, 6, 50}, {2, 4, 66}, {2, 3, 22}, {1, 6, 25}})); System.out.println("================================"); System.out.println(..
package org.example.알고리즘.전략망을둘로나누기; import java.util.Arrays; import java.util.LinkedList; import java.util.Queue; class Solution { public static void main(String[] args) { Solution solution = new Solution(); System.out.println(solution.solution(9, new int[][]{{1, 3}, {2, 3}, {3, 4}, {4, 5}, {4, 6}, {4, 7}, {7, 8}, {7, 9}})); System.out.println("================================"); System.out.prin..
package org.example.알고리즘.귤고르기; import java.util.Arrays; import java.util.List; import java.util.Map; import java.util.stream.Collectors; class Solution { public static void main(String[] args) { Solution solution = new Solution(); solution.solution(6, new int[]{1, 3, 2, 5, 4, 5, 2, 3}); System.out.println("================================"); solution.solution(4, new int[]{1, 3, 2, 5, 4, 5, 2, 3}..
package org.example.알고리즘.영어끝말잇기; import java.util.Arrays; import java.util.HashSet; import java.util.Set; class Solution { public static void main(String[] args) { Solution solution = new Solution(); String[] words = {"tank", "kick", "know", "wheel", "land", "dream", "mother", "robot", "tank"}; solution.solution(3, words); System.out.println(Arrays.toString(solution.solution(2, new String[]{"hel..