摘要: 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)
摘要: Given a non-empty string s and a dictionary wordDict containing a list of non-empty words, determine if s can be segmented into a space-separated sequ 阅读全文
posted @ 2020-11-17 11:02 Sheanne 阅读(68) 评论(0) 推荐(0)
摘要: Given n, how many structurally unique BST's (binary search trees) that store values 1 ... n? Example: Input: 3 Output: 5 Explanation: Given n = 3, the 阅读全文
posted @ 2020-11-17 10:51 Sheanne 阅读(96) 评论(0) 推荐(0)
摘要: Given a string s, return the maximum number of unique substrings that the given string can be split into. You can split string s into any list of non- 阅读全文
posted @ 2020-11-17 10:31 Sheanne 阅读(144) 评论(0) 推荐(0)
摘要: Given a binary tree, return the sum of values of its deepest leaves. Example 1: Input: root = [1,2,3,4,5,null,6,7,null,null,null,null,8] Output: 15 Co 阅读全文
posted @ 2020-11-16 06:43 Sheanne 阅读(87) 评论(0) 推荐(0)
摘要: Suppose you have a random list of people standing in a queue. Each person is described by a pair of integers (h, k), where h is the height of the pers 阅读全文
posted @ 2020-11-16 06:30 Sheanne 阅读(86) 评论(0) 推荐(0)
摘要: You are given an array of distinct integers arr and an array of integer arrays pieces, where the integers in pieces are distinct. Your goal is to form 阅读全文
posted @ 2020-11-16 05:19 Sheanne 阅读(245) 评论(0) 推荐(0)