DP1 [LeetCode] 446. Arithmetic Slices II - Subsequence 01.07.2024 1. Problem 2. The Things I tried I tried backtracking or a recursive function. But I could not make it and also the quiality of code was bad too. 3. Solution 3-1. Code var numberOfArithmeticSlices = function(nums) { const n = nums.length; let total_count = 0; const dp = new Array(n).fill().map(() => new Map()); for (let i = 1; i < n; ++i) { for (let j = 0; j < i; ++j) { const diff = n.. 2024. 1. 8. 이전 1 다음