[프로그래머스] 음양 더하기
·
알고리즘
https://school.programmers.co.kr/learn/courses/30/lessons/76501 for문을 돌면서 signs가 true일 때에는 +, false일때에는 - 로 풀면되는 아주 간단한 문제였다. 코드class Solution { public int solution(int[] absolutes, boolean[] signs) { int ans = 0; int len = absolutes.length; for(int i = 0; i