剑指 Offer 66. 构建乘积数组
题目链接:https://leetcode-cn.com/problems/gou-jian-cheng-ji-shu-zu-lcof/
算法流程
首先申请结果数组 res
求出左侧三角从上到下的值,依次存入 res[i] 中
求出右侧三角从下到上的值,并且和之前的 res[i] 做乘积存入,即可得到结果
作者:画手大鹏
链接:https://leetcode-cn.com/leetbook/read/illustrate-lcof/5wpmzm/
1 |
|
剑指 Offer 66. 构建乘积数组
https://pisces34.github.io/2022/03/02/leetcode/offer66/