mirror of
https://github.com/krahets/hello-algo.git
synced 2025-07-23 17:54:27 +08:00
build
This commit is contained in:
@ -750,6 +750,11 @@ comments: true
|
||||
for num in nums {
|
||||
count += num
|
||||
}
|
||||
// 同时遍历数据索引和元素
|
||||
for (i, num) in nums.enumerated() {
|
||||
count += nums[i]
|
||||
count += num
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
Reference in New Issue
Block a user