//数组对象中得值进行乘法处理
export function dataRuduce(arr1: any) {
const result = []
for (const v1 of arr1) {
result.push({
...v1, // arr2
count: Number(v1.layers) * Number(v1.ratio),
lotQty:Number(v1.ratio)
})
}
return result
}
2023-05-12 06:48:23 阅读次数:114
//数组对象中得值进行乘法处理
export function dataRuduce(arr1: any) {
const result = []
for (const v1 of arr1) {
result.push({
...v1, // arr2
count: Number(v1.layers) * Number(v1.ratio),
lotQty:Number(v1.ratio)
})
}
return result
}
LeetCode:239. 滑动窗口最大值
LeetCode:344.反转字符串
当一个数组中大部分元素为0,或者为同一个值的数组时,可以使用稀疏数组来保存该数组。
算法题 62. 不同路径,66. 加一,67. 二进制求和
Leetcode:242.有效的字母异位词
LeetCode 209 长度最小的子数组(滑动窗口)
LeetCode:977.有序数组的平方
Leetcode:1.两数之和
Leetcode27. 移除元素
数组是一组相同类型元素的集合。
文章
29774
阅读量
4163928
2025-02-19 10:05:11
2025-02-19 09:04:11
2025-02-19 09:03:26
2025-02-19 09:02:32
2025-02-13 08:33:48
2025-02-12 09:25:59
2023-03-28 03:29:30
2023-02-07 10:34:04
2022-12-28 07:22:30
2022-12-26 09:32:17
2022-12-26 09:32:17
2023-04-07 06:41:50