摘要: https://leetcode.com/problems/invert-binary-tree/description/Invert a binary tree. 4 / \ 2 7 / \ / \1 3 6 9to 4 / \ 7 2 / \ / \9 6 3 1time: o(n) : n nodes space:... 阅读全文
posted @ 2018-02-27 23:41 davidnyc 阅读(105) 评论(0) 推荐(0)
摘要: https://leetcode.com/problems/binary-tree-inorder-traversal/description/ Given a binary tree, return the inorder traversal of its nodes' values. For e 阅读全文
posted @ 2018-02-27 09:32 davidnyc 阅读(117) 评论(0) 推荐(0)
摘要: https://leetcode.com/problems/binary-tree-preorder-traversal/description/ Given a binary tree, return the preorder traversal of its nodes' values. For 阅读全文
posted @ 2018-02-27 09:29 davidnyc 阅读(114) 评论(0) 推荐(0)
摘要: https://leetcode.com/problems/maximum-depth-of-binary-tree/description/Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node do... 阅读全文
posted @ 2018-02-27 02:58 davidnyc 阅读(112) 评论(0) 推荐(0)
摘要: https://leetcode.com/problems/balanced-binary-tree/description/Given a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is defined as:a binary tree in wh... 阅读全文
posted @ 2018-02-27 02:39 davidnyc 阅读(136) 评论(0) 推荐(0)
摘要: https://leetcode.com/problems/binary-tree-postorder-traversal/description/ Description Implement an iterative, post-order traversal of a given binary 阅读全文
posted @ 2018-02-27 01:31 davidnyc 阅读(175) 评论(0) 推荐(0)