摘要:
1、95. 不同的二叉搜索树 II 考点: 递归思想 # Definition for a binary tree node. # class TreeNode: # def __init__(self, val=0, left=None, right=None): # self.val = val 阅读全文
摘要:
1、面试题 08.08. 有重复字符串的排列组合 class Solution: def permutation(self, S: str) -> List[str]: def bfs(cur_list): next_list = [] for cur in cur_list: cur_str, l 阅读全文
摘要:
1、面试题 02.02. 返回倒数第 k 个节点 考点: 1、collections.deque(maxlen=k)的使用 2、deque队尾插值append,队头取值的popleft()用法(或者result[0]) class Solution: def kthToLast(self, head 阅读全文