上一页 1 2 3 4 5 6 ··· 13 下一页
摘要: 题目描述: Find the contiguous subarray within an array (containing at least one number) which has the largest product. For example, given the array [2,3,- 阅读全文
posted @ 2018-04-10 21:46 宵夜在哪 阅读(112) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Find all possible combinations of k numbers that add up to a number n, given that only numbers from 1 to 9 can be used and each combination shou 阅读全文
posted @ 2018-04-08 23:42 宵夜在哪 阅读(106) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Find the kth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element. Fo 阅读全文
posted @ 2018-04-07 22:49 宵夜在哪 阅读(74) 评论(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 阅读全文
posted @ 2018-04-06 12:09 宵夜在哪 阅读(93) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Given a range [m, n] where 0 <= m <= n <= 2147483647, return the bitwise AND of all numbers in this range, inclusive. For example, given the ran 阅读全文
posted @ 2018-04-05 12:22 宵夜在哪 阅读(110) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Given a list of non negative integers, arrange them such that they form the largest number. For example, given [3, 30, 34, 5, 9], the largest fo 阅读全文
posted @ 2018-04-04 21:32 宵夜在哪 阅读(80) 评论(0) 推荐(0) 编辑
摘要: 虚函数概念: 在类的定义中,前面有virtual关键字的成员函数就是虚函数。 virtual关键字只用在类定义里的函数声明中,写函数体时不用。 构造函数和静态成员函数不能是虚函数。 多态的表现形式: 1) 派生类的指针可以赋给基类指针。 通过基类指针可以调用基类和派生类中的同名虚函数时:指针指向哪个 阅读全文
posted @ 2018-04-03 21:43 宵夜在哪 阅读(138) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. An island is surrounded by water and is formed by connecting a 阅读全文
posted @ 2018-04-03 15:36 宵夜在哪 阅读(95) 评论(0) 推荐(0) 编辑
摘要: 题目描述: Given a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can see ordered from top to bottom. F 阅读全文
posted @ 2018-04-02 08:39 宵夜在哪 阅读(95) 评论(0) 推荐(0) 编辑
摘要: 题目描述: A peak element is an element that is greater than its neighbors. Given an input array where num[i] ≠ num[i+1], find a peak element and return it 阅读全文
posted @ 2018-04-01 18:29 宵夜在哪 阅读(80) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 13 下一页