product-of-array-except-self (1) 썸네일형 리스트형 LeetCode) product-of-array-except-self 문제링크 : https://leetcode.com/problems/product-of-array-except-self/description/ 쉬운 문제라고 생각했다.You must write an algorithm that runs in O(n) time and without using the division operation. 를 보기 전까지는. 내가 작성한 코드는 아래와 같다.var productExceptSelf = function (nums) { const result = Array(nums.length); let temp = 1; for (let i = 0; i = 0; i--) { result[i] *= temp; temp *= nums[i] }.. 이전 1 다음