上一页 1 ··· 8 9 10 11 12 13 14 下一页
摘要: Given a non-empty string s and an integer k, rearrange the string such that the same characters are at least distance k from each other. All input str 阅读全文
posted @ 2018-12-22 21:34 yuxihong 阅读(189) 评论(0) 推荐(0) 编辑
摘要: There is a garden with N slots. In each slot, there is a flower. The N flowers will bloom one by one in Ndays. In each day, there will be exactly one 阅读全文
posted @ 2018-12-22 20:15 yuxihong 阅读(147) 评论(0) 推荐(0) 编辑
摘要: Given strings S and T, find the minimum (contiguous) substring W of S, so that T is a subsequenceof W. If there is no such window in S that covers all 阅读全文
posted @ 2018-12-22 12:28 yuxihong 阅读(145) 评论(0) 推荐(0) 编辑
摘要: There is a ball in a maze with empty spaces and walls. The ball can go through empty spaces by rolling up(u), down (d), left (l) or right (r), but it 阅读全文
posted @ 2018-12-22 02:23 yuxihong 阅读(206) 评论(0) 推荐(0) 编辑
摘要: A group of friends went on holiday and sometimes lent each other money. For example, Alice paid for Bill's lunch for $10. Then later Chris gave Alice 阅读全文
posted @ 2018-12-21 20:52 yuxihong 阅读(142) 评论(0) 推荐(0) 编辑
摘要: An image is represented by a binary matrix with 0 as a white pixel and 1 as a black pixel. The black pixels are connected, i.e., there is only one bla 阅读全文
posted @ 2018-12-21 20:03 yuxihong 阅读(145) 评论(0) 推荐(0) 编辑
摘要: Design an algorithm to encode an N-ary tree into a binary tree and decode the binary tree to get the original N-ary tree. An N-ary tree is a rooted tr 阅读全文
posted @ 2018-12-21 19:35 yuxihong 阅读(221) 评论(0) 推荐(0) 编辑
摘要: On a horizontal number line, we have gas stations at positions stations[0], stations[1], ..., stations[N-1], where N = stations.length. Now, we add K  阅读全文
posted @ 2018-12-21 16:05 yuxihong 阅读(121) 评论(0) 推荐(0) 编辑
摘要: Given a non-empty binary search tree and a target value, find k values in the BST that are closest to the target. Note: Given target value is a floati 阅读全文
posted @ 2018-12-21 03:22 yuxihong 阅读(182) 评论(0) 推荐(0) 编辑
摘要: Given an array consisting of n integers, find the contiguous subarray whose length is greater than or equal to k that has the maximum average value. A 阅读全文
posted @ 2018-12-21 01:17 yuxihong 阅读(221) 评论(0) 推荐(0) 编辑
上一页 1 ··· 8 9 10 11 12 13 14 下一页