Leetcode 238. 除自身以外数组的乘积
2 种写法。 python 和 C语言
1. python
class Solution:def productExceptSelf(self, nums: List[int]) -> List[int]:# nums [1, 2, 3]# L [1, ]n len(nums) # L, R ,分别代码左右的 乘积列表L, R, ret [0] * n, [0] * n, [0] * nL[0] 1for i in rang…
数据结构与算法
2024/7/20 1:52:23