上一页 1 ··· 22 23 24 25 26 27 28 29 30 ··· 76 下一页
摘要: Given a binary array, find the maximum number of consecutive 1s in this array. Example 1: Input: [1,1,0,1,1,1] Output: 3 Explanation: The first two di 阅读全文
posted @ 2020-07-04 12:43 Schwifty 阅读(134) 评论(0) 推荐(0)
摘要: Design and implement a data structure for Least Frequently Used (LFU) cache. It should support the following operations: get and put. get(key) - Get t 阅读全文
posted @ 2020-07-04 12:36 Schwifty 阅读(136) 评论(0) 推荐(0)
摘要: There are 8 prison cells in a row, and each cell is either occupied or vacant. Each day, whether the cell is occupied or vacant changes according to t 阅读全文
posted @ 2020-07-04 08:31 Schwifty 阅读(179) 评论(0) 推荐(0)
摘要: Assume you are an awesome parent and want to give your children some cookies. But, you should give each child at most one cookie. Each child i has a g 阅读全文
posted @ 2020-07-03 11:45 Schwifty 阅读(145) 评论(0) 推荐(0)
摘要: Given a non-empty integer array of size n, find the minimum number of moves required to make all array elements equal, where a move is incrementing n  阅读全文
posted @ 2020-07-03 11:15 Schwifty 阅读(132) 评论(0) 推荐(0)
摘要: Count the number of segments in a string, where a segment is defined to be a contiguous sequence of non-space characters. Please note that the string 阅读全文
posted @ 2020-07-03 10:15 Schwifty 阅读(121) 评论(0) 推荐(0)
摘要: There are n items each belonging to zero or one of m groups where group[i] is the group that the i-th item belongs to and it's equal to -1 if the i-th 阅读全文
posted @ 2020-07-02 11:37 Schwifty 阅读(354) 评论(0) 推荐(0)
摘要: Design your implementation of the circular double-ended queue (deque). Your implementation should support following operations: MyCircularDeque(k): Co 阅读全文
posted @ 2020-07-02 07:38 Schwifty 阅读(211) 评论(0) 推荐(0)
摘要: You have a total of n coins that you want to form in a staircase shape, where every k-th row must have exactly k coins. Given n, find the total number 阅读全文
posted @ 2020-07-01 22:51 Schwifty 阅读(143) 评论(0) 推荐(0)
摘要: 以下转载自https://how2j.cn/k/javascript/javascript-tag/425.html 1. javascript代码必须放在script标签中script标签可以放在html的任何地方,一般建议放在head标签里,按先后顺序执行 2.JavaScript注释 //单行 阅读全文
posted @ 2020-07-01 12:52 Schwifty 阅读(139) 评论(0) 推荐(0)
上一页 1 ··· 22 23 24 25 26 27 28 29 30 ··· 76 下一页