posted @ 2019-02-10 22:33
Sempron2800+
阅读(121)
推荐(0)
摘要:
上面这个是参考别人的解决方案,思路不好理解,我又从新写了一个啰嗦的:
阅读全文
posted @ 2019-02-10 13:59
Sempron2800+
阅读(175)
推荐(0)
摘要:
1 public class Solution 2 { 3 private Stack ST = new Stack(); 4 private string SmallestStr = String.Empty; 5 private string[] Ary = new string[] { "a","b","c","d","e"...
阅读全文
posted @ 2019-02-05 22:33
Sempron2800+
阅读(134)
推荐(0)
摘要:
这道题的描述有一些不清楚,主要是If two nodes have the same position, then the value of the node that is reported first is the value that is smaller. 这一句,应该是先按照层排序,同层的
阅读全文
posted @ 2019-02-05 21:52
Sempron2800+
阅读(158)
推荐(0)
摘要:
class Solution: def judgeIntersection(self,a:'Interval',b:'Interval'): #返回值1,bool类型,是否有交集:True-有交集,False-无交集 #返回值2,int类型,哪个先结束:0-A先结束,1-B先结束,2-AB同时结束 #返回值3,Interval类型,交集的...
阅读全文
posted @ 2019-02-05 18:34
Sempron2800+
阅读(215)
推荐(0)
摘要:
import sys class Solution: def sumEvenAfterQueries(self, A: 'List[int]', queries: 'List[List[int]]') -> 'List[int]': result = list() len0 = len(A) len1 = len(queries) ...
阅读全文
posted @ 2019-02-03 16:46
Sempron2800+
阅读(155)
推荐(0)
摘要:
public class Solution { public int MincostTickets(int[] days, int[] costs) { int weeklyStart = 0; int monthlyStart = 0; int[] dp = new int[days...
阅读全文
posted @ 2019-01-28 18:35
Sempron2800+
阅读(256)
推荐(0)
摘要:
public class Solution { private string M1(int A, int B) { StringBuilder sb = new StringBuilder(); int groupA = A / 2; int freeA = A % 2; ...
阅读全文
posted @ 2019-01-28 14:53
Sempron2800+
阅读(125)
推荐(0)
posted @ 2019-01-22 11:38
Sempron2800+
阅读(114)
推荐(0)
摘要:
public class Solution { public IList PowerfulIntegers(int x, int y, int bound) { var list = new List(); for (int i = 0; i a).ToList(); ...
阅读全文
posted @ 2019-01-22 11:02
Sempron2800+
阅读(125)
推荐(0)