[프로그래머스] 겹치는 선분의 길이 문제 풀이(코딩테스트 입문 Lv. 0) - 자바 Java
0. 자세한 설명은 YouTube 영상으로 1. 배열을 활용한 Solution class Solution { public int solution(int[][] lines) { // 1. arr 배열 및 변수 초기화 int[] arr = new int[200]; int answer = 0; // 2. lines 정보를 arr 배열에 적용 for(int i = 0; i 1) answer++; return answer; } }
2022.12.10