摘要: 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) 编辑