mirror of
https://github.com/krahets/hello-algo.git
synced 2026-07-22 19:36:06 +00:00
build
This commit is contained in:
@@ -45,7 +45,7 @@ comments: true
|
||||
=== "Python"
|
||||
|
||||
```python title="hashing_search.py"
|
||||
def hashing_search_array(mapp: Dict[int, int], target: int) -> int:
|
||||
def hashing_search_array(mapp: dict[int, int], target: int) -> int:
|
||||
""" 哈希查找(数组) """
|
||||
# 哈希表的 key: 目标元素,value: 索引
|
||||
# 若哈希表中无此 key ,返回 -1
|
||||
@@ -163,7 +163,7 @@ comments: true
|
||||
=== "Python"
|
||||
|
||||
```python title="hashing_search.py"
|
||||
def hashing_search_linkedlist(mapp: Dict[int, ListNode], target: int) -> Optional[ListNode]:
|
||||
def hashing_search_linkedlist(mapp: dict[int, ListNode], target: int) -> ListNode | None:
|
||||
""" 哈希查找(链表) """
|
||||
# 哈希表的 key: 目标元素,value: 结点对象
|
||||
# 若哈希表中无此 key ,返回 None
|
||||
|
||||
Reference in New Issue
Block a user