leetcode
冰镇nn
这个作者很懒,什么都没留下…
展开
-
Balanced Binary Tree
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 which the depth of the two subtrees of every node never diffe原创 2015-11-04 21:12:05 · 298 阅读 · 0 评论 -
Invert Binary Tree
Invert a binary tree. 4 / \ 2 7 / \ / \ 1 3 6 9 to 4 / \ 7 2 / \ / \ 9 6 3 1/** * Definition for a binary tree node. * struct TreeNode { * int v原创 2015-11-04 20:39:51 · 291 阅读 · 0 评论 -
Remove Linked List Elements
很简单的题目,记录一下 /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { pub原创 2015-10-26 20:42:04 · 288 阅读 · 0 评论