Update code style for Python

This commit is contained in:
krahets
2023-03-03 03:07:22 +08:00
parent 7e9e6b000c
commit 7c501140f0
45 changed files with 274 additions and 266 deletions

View File

@@ -6,16 +6,16 @@ Author: timi (xisunyy@163.com)
import sys, os.path as osp
sys.path.append(osp.dirname(osp.dirname(osp.abspath(__file__))))
from include import *
from modules import *
""" 哈希查找(数组) """
def hashing_search_array(mapp, target):
""" 哈希查找(数组) """
# 哈希表的 key: 目标元素value: 索引
# 若哈希表中无此 key ,返回 -1
return mapp.get(target, -1)
""" 哈希查找(链表) """
def hashing_search_linkedlist(mapp, target):
""" 哈希查找(链表) """
# 哈希表的 key: 目标元素value: 结点对象
# 若哈希表中无此 key ,返回 -1
return mapp.get(target, -1)