leetcode添加元素使和等于-leetcode:leetcode

时间:2021-06-30 06:46:04
【文件属性】:
文件名称:leetcode添加元素使和等于-leetcode:leetcode
文件大小:4KB
文件格式:ZIP
更新时间:2021-06-30 06:46:04
系统开源 leetcode添加元素使和等于 Leet Code Record @(LeetCode) 953. sorted: iterable: 可迭代对象 cmp: 比较函数,可以利用自带的cmp函数 key: 比较关键字 reverse: False升序,True降序 sorted(iterable, cmp=None, key=None, reverse=False) # eg: sorted(list, cmp = lambda x, y: cmp(x+y, -y)) sorted(list, key = lambda x: x[0], reverse = True) 001. 涉及到 下标记录 的问题,善用字典(哈希表) # hashmap = {key: value} # hashmap[key] = value 1249. enumerate, for 比 python 内部的查找算法更费时间 str.join(sequence): 将 sequence 中的字符以 str 连接成字符产 # 字符转list: li = list(s) # list转字符:str.join(seq
【文件预览】:
leetcode-master
----README.md(9KB)

网友评论