摘要: https://leetcode.com/problems/invert-binary-tree/#/description 补充一个使用层次遍历处理的方案,java实现 补充一个python的实现: 阅读全文
posted @ 2017-04-19 11:02 Sempron2800+ 阅读(132) 评论(0) 推荐(0) 编辑
摘要: public class Solution { public int GetSum(int a, int b) { return b == 0 ? a : GetSum(a ^ b, (a & b) << 1); } } https://leetcode.com/problems/sum-of-tw 阅读全文
posted @ 2017-04-19 11:00 Sempron2800+ 阅读(124) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/find-the-difference/#/description 阅读全文
posted @ 2017-04-19 10:59 Sempron2800+ 阅读(112) 评论(0) 推荐(0) 编辑
摘要: /** * Definition for a binary tree node. * public class TreeNode { * public int val; * public TreeNode left; * public TreeNode right; * public TreeNod 阅读全文
posted @ 2017-04-19 10:59 Sempron2800+ 阅读(123) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/find-all-numbers-disappeared-in-an-array/#/description 阅读全文
posted @ 2017-04-19 10:58 Sempron2800+ 阅读(129) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/detect-capital/#/description 阅读全文
posted @ 2017-04-19 10:57 Sempron2800+ 阅读(125) 评论(0) 推荐(0) 编辑
摘要: public class Solution { public int SingleNumber(int[] nums) { Dictionary<int, int> dic = new Dictionary<int, int>(); foreach (var n in nums) { if (!di 阅读全文
posted @ 2017-04-19 10:56 Sempron2800+ 阅读(214) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/nim-game/#/description 阅读全文
posted @ 2017-04-19 10:55 Sempron2800+ 阅读(103) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/max-consecutive-ones/#/description 阅读全文
posted @ 2017-04-19 10:55 Sempron2800+ 阅读(103) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/island-perimeter/#/description 阅读全文
posted @ 2017-04-19 10:54 Sempron2800+ 阅读(135) 评论(0) 推荐(0) 编辑