프로그래머스/LEVEL 1
2022. 1. 17.
[프로그래머스/LEVEL1] 최소직사각형
최소직사각형 문제 https://programmers.co.kr/learn/courses/30/lessons/86491 코딩테스트 연습 - 최소직사각형 [[10, 7], [12, 3], [8, 15], [14, 7], [5, 15]] 120 [[14, 4], [19, 6], [6, 16], [18, 7], [7, 11]] 133 programmers.co.kr 코드 class Solution { public int solution(int[][] sizes) { int result = 0; // 가로를 가장 긴부분으로 설정 int max_w = 0;// 가로 int max_h = 0;// 세로 // Math.min([집합]),Math.max([집합]) for (int i = 0; i < sizes.leng..