摘要:
二叉树的从上到下的打印代码参考: print binary tree level by level in python 主要是为了更加清晰的看到二叉树的结构 再发一遍参考代码的网址: https://stackoverflow.com/questions/34012886/print-binary- 阅读全文
摘要:
代码 不使用递归且不引入标准库,单纯用两个for循环即可得出一个list的所有子集 LIST = [1, 2, 3, 4] LEN_LIST = len(LIST) lst = [[]] for i in range(LEN_LIST): # 固定的值 for j in range(len(lst) 阅读全文