- 博客(2)
- 收藏
- 关注
原创 [LeetCode 226] 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 {
2016-10-28 21:54:03 315
原创 [LeetCode258] Add Digits
Given a non-negative integer num, repeatedly add all its digits until the result has only one digit. For example: Given num = 38, the process is like: 3 + 8 = 11, 1 + 1 = 2. Since 2 has on
2016-10-28 20:54:51 269
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人