[프로그래머스] 수식 최대화
function solution(expression) { const prior = [ ["-", "*", "+"], ["-", "+", "*"], ["+", "*", "-"], ["+", "-", "*"], ["*", "+", "-"], ["*", "-", "+"], ]; function reset(expression) { let newArr = []; let vertical = 0; for (let i = 0; i < expression.length; i++) { if (expression[i] === "-" || expression[i] === "*" || expression[i] === "+") { newArr.push(expression.slice(vertical, i)); newArr.push(..
2022. 3. 7.