曾经帆布鞋

文章
5
资源
0
加入时间
3年1月13天

两数之和

用了一次暴力法,结果显示时间超时。检查了一遍,运行结果没有错,就是单纯的时间复杂度高了最后尝试了一次hash表,倒是成功了。字典的确拥有着比列表更高效的查找效率。class Solution: def twoSum(self, nums: List[int], target: int) -> List[int]: n=len(nums) i...