Flying Orange
  • Home
  • Python
  • Golang
  • Docker
  • PHP
  • 中文博客
  • Reward打赏

python

python related blogs and examples

python

二叉树行间逆向遍历

将一个二叉树逐行遍历,但是遍历方向逐行翻转import time from collections import defaultdict class Node(object): def __init__(self, value, left, right, depth): self.value = value self.left = left self.right = right self.depth = depth rows = defaultdict(list) def

  • Orange
1 min read
Flying Orange © 2018
Latest Posts Facebook Twitter Ghost