mirror of
https://github.com/krahets/hello-algo.git
synced 2025-07-25 11:13:38 +08:00
1. Add the building util of Python
for the markdown docs. 2. Update the deploy.sh
This commit is contained in:
12
docs/chapter_searching/hashing_search.md
Normal file → Executable file
12
docs/chapter_searching/hashing_search.md
Normal file → Executable file
@ -43,11 +43,7 @@ comments: true
|
||||
=== "Python"
|
||||
|
||||
```python title="hashing_search.py"
|
||||
""" 哈希查找(数组) """
|
||||
def hashing_search_array(mapp, target):
|
||||
# 哈希表的 key: 目标元素,value: 索引
|
||||
# 若哈希表中无此 key ,返回 -1
|
||||
return mapp.get(target, -1)
|
||||
[class]{}-[func]{hashing_search_array}
|
||||
```
|
||||
|
||||
=== "Go"
|
||||
@ -153,11 +149,7 @@ comments: true
|
||||
=== "Python"
|
||||
|
||||
```python title="hashing_search.py"
|
||||
""" 哈希查找(链表) """
|
||||
def hashing_search_linkedlist(mapp, target):
|
||||
# 哈希表的 key: 目标元素,value: 结点对象
|
||||
# 若哈希表中无此 key ,返回 -1
|
||||
return mapp.get(target, -1)
|
||||
[class]{}-[func]{hashing_search_linkedlist}
|
||||
```
|
||||
|
||||
=== "Go"
|
||||
|
Reference in New Issue
Block a user