프로그래머스 자바2 [프로그래머스] 카펫 문제 : https://school.programmers.co.kr/learn/courses/30/lessons/42842 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 해결 : class Solution { public int[] solution(int brown, int yellow) { int[] answer = new int[2]; int total = brown + yellow; for (int i = 1; i 2024. 4. 14. [코딩 기초 트레이닝] 조건에 맞게 수열 변환하기 2 문제 : https://school.programmers.co.kr/learn/courses/30/lessons/181881 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 해결 : class Solution { public int solution(int[] arr) { int[] before = new int[arr.length]; int cnt = 0; int answer = 0; while(cnt != arr.length){ cnt = 0; before = arr.clone(); for(int i = 0; i=50 && arr[i]%2 == 0){ a.. 2024. 1. 2. 이전 1 다음