摘要: https://leetcode.com/problems/base-7/#/description 阅读全文
posted @ 2017-04-19 11:21 Sempron2800+ 阅读(135) 评论(0) 推荐(0) 编辑
摘要: public class Solution { public bool IsAnagram(string s, string t) { Dictionary<char, int> dic = new Dictionary<char, int>(); foreach (var c in s) { if 阅读全文
posted @ 2017-04-19 11:20 Sempron2800+ 阅读(188) 评论(0) 推荐(0) 编辑
摘要: public class Solution { public int MajorityElement(int[] nums) { Dictionary<int, int> dic = new Dictionary<int, int>(); var len = nums.Length; for (in 阅读全文
posted @ 2017-04-19 11:19 Sempron2800+ 阅读(256) 评论(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 11:18 Sempron2800+ 阅读(179) 评论(0) 推荐(0) 编辑
摘要: /** * Definition for singly-linked list. * public class ListNode { * public int val; * public ListNode next; * public ListNode(int x) { val = x; } * } 阅读全文
posted @ 2017-04-19 11:17 Sempron2800+ 阅读(134) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/excel-sheet-column-number/#/description 补充一个python的实现: 阅读全文
posted @ 2017-04-19 11:16 Sempron2800+ 阅读(220) 评论(0) 推荐(0) 编辑
摘要: public class Solution { public int MaxProfit(int[] prices) { var list = new List<KeyValuePair<int, int>>(); //记录所有的极大值和极小值 if (prices.Length <= 1) { r 阅读全文
posted @ 2017-04-19 11:15 Sempron2800+ 阅读(196) 评论(0) 推荐(0) 编辑
摘要: public class Solution { public int FirstUniqChar(string s) { Dictionary<char, int> dic = new Dictionary<char, int>(); foreach (char c in s) { if (!dic 阅读全文
posted @ 2017-04-19 11:14 Sempron2800+ 阅读(172) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/sum-of-left-leaves/#/description 补充一个python的实现: 阅读全文
posted @ 2017-04-19 11:13 Sempron2800+ 阅读(95) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/intersection-of-two-arrays/#/description 阅读全文
posted @ 2017-04-19 11:12 Sempron2800+ 阅读(84) 评论(0) 推荐(0) 编辑