上一页 1 2 3 4 5 6 7 8 ··· 29 下一页
摘要: Say you have an array for which the ith element is the price of a given stock on day i.Design an algorithm to find the maximum profit. You may complet 阅读全文
posted @ 2018-09-24 10:02 jasminemzy 阅读(123) 评论(0) 推荐(0) 编辑
摘要: On a 2x3 board, there are 5 tiles represented by the integers 1 through 5, and an empty square represented by 0.A move consists of choosing 0 and a 4- 阅读全文
posted @ 2018-09-19 09:29 jasminemzy 阅读(422) 评论(0) 推荐(0) 编辑
摘要: We have a grid of 1s and 0s; the 1s in a cell represent bricks. A brick will not drop if and only if it is directly connected to the top of the grid, 阅读全文
posted @ 2018-09-19 08:27 jasminemzy 阅读(222) 评论(0) 推荐(0) 编辑
摘要: Given a sorted array, two integers k and x, find the k closest elements to x in the array. The result should also be sorted in ascending order. If the 阅读全文
posted @ 2018-09-19 07:04 jasminemzy 阅读(254) 评论(0) 推荐(0) 编辑
摘要: This question is about implementing a basic elimination algorithm for Candy Crush.Given a 2D integer array board representing the grid of candy, diffe 阅读全文
posted @ 2018-09-19 06:41 jasminemzy 阅读(412) 评论(0) 推荐(0) 编辑
摘要: There are N gas stations along a circular route, where the amount of gas at station i is gas[i].You have a car with an unlimited gas tank and it costs 阅读全文
posted @ 2018-09-18 14:40 jasminemzy 阅读(117) 评论(0) 推荐(0) 编辑
摘要: Given a string, find the length of the longest substring T that contains at most k distinct characters.Example 1:Input: s = "eceba", k = 2Output: 3Exp 阅读全文
posted @ 2018-09-18 14:00 jasminemzy 阅读(230) 评论(0) 推荐(0) 编辑
摘要: Given a list accounts, each element accounts[i] is a list of strings, where the first element accounts[i][0] is a name, and the rest of the elements a 阅读全文
posted @ 2018-09-18 13:28 jasminemzy 阅读(230) 评论(0) 推荐(0) 编辑
摘要: Design a hit counter which counts the number of hits received in the past 5 minutes.Each function accepts a timestamp parameter (in seconds granularit 阅读全文
posted @ 2018-09-18 11:52 jasminemzy 阅读(184) 评论(0) 推荐(0) 编辑
摘要: Design a logger system that receive stream of messages along with its timestamps, each message should be printed if and only if it is not printed in t 阅读全文
posted @ 2018-09-18 11:46 jasminemzy 阅读(211) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 29 下一页