mirror of
https://github.com/krahets/hello-algo.git
synced 2025-11-02 21:24:53 +08:00
feat: Add the section of permutations problem. (#476)
* Add the section of permutations problem. * Update permutations_problem.md
This commit is contained in:
@ -54,6 +54,9 @@ def traverse(nums: list[int]) -> None:
|
||||
# 直接遍历数组
|
||||
for num in nums:
|
||||
count += 1
|
||||
# 同时遍历数据索引和元素
|
||||
for i, num in enumerate(nums):
|
||||
count += 1
|
||||
|
||||
|
||||
def find(nums: list[int], target: int) -> int:
|
||||
|
||||
Reference in New Issue
Block a user