摘要: A string of '0's and '1's is monotone increasing if it consists of some number of '0's (possibly 0), followed by some number of '1's (also possibly 0. 阅读全文
posted @ 2020-11-19 11:45 Sheanne 阅读(64) 评论(0) 推荐(0)
摘要: You are given n pairs of numbers. In every pair, the first number is always smaller than the second number. Now, we define a pair (c, d) can follow an 阅读全文
posted @ 2020-11-19 06:42 Sheanne 阅读(82) 评论(0) 推荐(0)
摘要: For some fixed N, an array A is beautiful if it is a permutation of the integers 1, 2, ..., N, such that: For every i < j, there is no k with i < k < 阅读全文
posted @ 2020-11-19 06:12 Sheanne 阅读(85) 评论(0) 推荐(0)
摘要: Given an array nums of 0s and 1s and an integer k, return True if all 1's are at least k places away from each other, otherwise return False. Example 阅读全文
posted @ 2020-11-19 00:23 Sheanne 阅读(86) 评论(0) 推荐(0)