摘要:
https://leetcode.com/problems/invert-binary-tree/#/description 补充一个使用层次遍历处理的方案,java实现 补充一个python的实现: 阅读全文
摘要:
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 阅读全文
摘要:
https://leetcode.com/problems/find-the-difference/#/description 阅读全文
摘要:
/** * Definition for a binary tree node. * public class TreeNode { * public int val; * public TreeNode left; * public TreeNode right; * public TreeNod 阅读全文
摘要:
https://leetcode.com/problems/find-all-numbers-disappeared-in-an-array/#/description 阅读全文
摘要:
https://leetcode.com/problems/detect-capital/#/description 阅读全文
摘要:
public class Solution { public int SingleNumber(int[] nums) { Dictionary<int, int> dic = new Dictionary<int, int>(); foreach (var n in nums) { if (!di 阅读全文
摘要:
https://leetcode.com/problems/nim-game/#/description 阅读全文
摘要:
https://leetcode.com/problems/max-consecutive-ones/#/description 阅读全文
摘要:
https://leetcode.com/problems/island-perimeter/#/description 阅读全文