上一页 1 ··· 59 60 61 62 63 64 65 66 67 ··· 98 下一页
摘要: You have a number of envelopes with widths and heights given as a pair of integers (w, h). One envelope can fit into another if and only if both the w 阅读全文
posted @ 2018-11-04 11:08 Veritas_des_Liberty 阅读(270) 评论(0) 推荐(0)
摘要: A peak element is an element that is greater than its neighbors. Given an input array nums, where nums[i] ≠ nums[i+1], find a peak element and return 阅读全文
posted @ 2018-11-03 22:38 Veritas_des_Liberty 阅读(228) 评论(0) 推荐(0)
摘要: Given an array nums containing n + 1 integers where each integer is between 1 and n (inclusive), prove that at least one duplicate number must exist. 阅读全文
posted @ 2018-11-03 22:21 Veritas_des_Liberty 阅读(176) 评论(0) 推荐(0)
摘要: The demons had captured the princess (P) and imprisoned her in the bottom-right corner of a dungeon. The dungeon consists of M x N rooms laid out in a 阅读全文
posted @ 2018-11-03 17:16 Veritas_des_Liberty 阅读(240) 评论(0) 推荐(0)
摘要: Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties: Integers in each row are sorted i 阅读全文
posted @ 2018-11-03 15:36 Veritas_des_Liberty 阅读(185) 评论(0) 推荐(0)
摘要: Given an unsorted array of integers, find the length of longest increasing subsequence. Example: Input: [10,9,2,5,3,7,101,18] Output: 4 Explanation: T 阅读全文
posted @ 2018-11-02 22:37 Veritas_des_Liberty 阅读(190) 评论(0) 推荐(0)
摘要: code C // Forward declaration of isBadVersion API. bool isBadVersion(int version); class Solution { public: int firstBadVersion(int n) { int l = 1; in 阅读全文
posted @ 2018-11-01 18:47 Veritas_des_Liberty 阅读(151) 评论(0) 推荐(0)
摘要: You are a product manager and currently leading a team to develop a new product. Unfortunately, the latest version of your product fails the quality c 阅读全文
posted @ 2018-11-01 18:04 Veritas_des_Liberty 阅读(158) 评论(0) 推荐(0)
摘要: Given an array of n positive integers and a positive integer s, find the minimal length of a contiguous subarray of which the sum ≥ s. If there isn't 阅读全文
posted @ 2018-11-01 17:29 Veritas_des_Liberty 阅读(171) 评论(0) 推荐(0)
摘要: Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand. (i.e., [0,1,2,4,5,6,7] might become [4,5,6,7,0,1,2]). F 阅读全文
posted @ 2018-11-01 16:46 Veritas_des_Liberty 阅读(147) 评论(0) 推荐(0)
上一页 1 ··· 59 60 61 62 63 64 65 66 67 ··· 98 下一页