2018年1月9日

path sum II(深度优先的递归实现掌握)

摘要: Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum. For example:Given the below binary tree and sum 阅读全文

posted @ 2018-01-09 20:34 夜的第八章 阅读(133) 评论(0) 推荐(0) 编辑

convert sorted list to binary search tree(将有序链表转成平衡二叉搜索树)

摘要: Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST. For this problem, a height-balanced bina 阅读全文

posted @ 2018-01-09 19:26 夜的第八章 阅读(205) 评论(0) 推荐(0) 编辑

Binary Tree Zigzag Level Order Traversal(z字形打印二叉树)

摘要: Given a binary tree, return the zigzag level order traversal of its nodes' values. (ie, from left to right, then right to left for the next level and 阅读全文

posted @ 2018-01-09 11:25 夜的第八章 阅读(222) 评论(0) 推荐(0) 编辑

导航