摘要:
public Node connect(Node root) { if(root == null) return root; Deque<Node> q = new LinkedList(); q.offer(root); while(!q.isEmpty()) { int size = q.siz 阅读全文
摘要:
public int minDepth(TreeNode root) { int depth = 0; if(root == null) return depth; Deque<TreeNode> q = new LinkedList(); q.offer(root); while(!q.isEmp 阅读全文