YJ의 새벽

프로그래머스(0) - 할 일 목록 [JAVA] 본문

코딩테스트연습/프로그래머스

프로그래머스(0) - 할 일 목록 [JAVA]

YJDawn 2024. 3. 15. 14:24

 

 

 

 

 

class Solution {
    public List<String> solution(String[] todo_list, boolean[] finished) {
        // List 로 바꿔준다.
    	List<String> answer = new ArrayList<>();
        
        for(int i=0; i<todo_list.length; i++) {
        	if( finished[i] == false ) {
        		answer.add(todo_list[i]);
        	}
        }
        
        return answer;
    }
}
Comments