上一页 1 ··· 81 82 83 84 85 86 87 88 89 ··· 114 下一页
摘要: public class Solution { public int DominantIndex(int[] nums) { var list = new List>(); for (int i = 0; i (i, nums[i])); } var olis... 阅读全文
posted @ 2018-10-01 11:58 Sempron2800+ 阅读(86) 评论(0) 推荐(0) 编辑
摘要: public class Solution { public string LongestWord(string[] words) { var maxlist = new List(); var dic = new Dictionary(); Queue Q = new Qu... 阅读全文
posted @ 2018-10-01 11:40 Sempron2800+ 阅读(109) 评论(0) 推荐(0) 编辑
摘要: class Solution { public: vector V; void postTree(TreeNode* node) { if (node != NULL) { V.push_back(node->val); if (node->left != NULL) ... 阅读全文
posted @ 2018-10-01 09:48 Sempron2800+ 阅读(90) 评论(0) 推荐(0) 编辑
摘要: 大体思路是正确的,有些细节没有考虑清楚。参考了网上的答案进行了修正。 阅读全文
posted @ 2018-10-01 09:32 Sempron2800+ 阅读(115) 评论(0) 推荐(0) 编辑
摘要: public class Solution { public char NextGreatestLetter(char[] letters, char target) { //a-97 z-122 var dic = new List>(); //key存储当前值,int是下一个值 ... 阅读全文
posted @ 2018-10-01 08:36 Sempron2800+ 阅读(117) 评论(0) 推荐(0) 编辑
摘要: public class Solution { public string MostCommonWord(string paragraph, string[] banned) { //"a, a, a, a, b,b,b,c, c" paragraph = paragraph.ToLower().Replac... 阅读全文
posted @ 2018-09-30 22:50 Sempron2800+ 阅读(118) 评论(0) 推荐(0) 编辑
摘要: class Solution { public: bool backspaceCompare(string S, string T) { stack ST1; for (int i = 0; i ST2; for (int i = 0; i < T.length(); i++) { char c =... 阅读全文
posted @ 2018-09-30 22:33 Sempron2800+ 阅读(112) 评论(0) 推荐(0) 编辑
摘要: class MyHashMap { public: vector hashMap; /** Initialize your data structure here. */ MyHashMap() { } /** value will always be non-negative. */ void put(int key,... 阅读全文
posted @ 2018-09-30 20:55 Sempron2800+ 阅读(106) 评论(0) 推荐(0) 编辑
摘要: public class Solution { public IList> LargeGroupPositions(string S) { //"babaaaabbb" var list = new List>(); int len = S.Length; if... 阅读全文
posted @ 2018-09-30 20:45 Sempron2800+ 阅读(97) 评论(0) 推荐(0) 编辑
摘要: public class Solution { public int FindShortestSubArray(int[] nums) { //先找到最大频度的数字都有哪些,加入到一个集合中 var dic = new Dictionary(); var dic... 阅读全文
posted @ 2018-09-30 18:46 Sempron2800+ 阅读(98) 评论(0) 推荐(0) 编辑
上一页 1 ··· 81 82 83 84 85 86 87 88 89 ··· 114 下一页