上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 16 下一页
摘要: 题目:Say you have an array for which the ith element is the price of a given stock on day i.Design an algorithm to find the maximum profit. You may comp... 阅读全文
posted @ 2015-11-28 21:57 lasclocker 阅读(1029) 评论(0) 推荐(0) 编辑
摘要: 题目:Convert a non-negative integer to its english words representation. Given input is guaranteed to be less than 2^31 - 1.For example,123 -> "One Hund... 阅读全文
posted @ 2015-11-27 13:39 lasclocker 阅读(185) 评论(0) 推荐(0) 编辑
摘要: 题目:Say you have an array for which the ith element is the price of a given stock on day i.Design an algorithm to find the maximum profit. You may comp... 阅读全文
posted @ 2015-11-26 13:56 lasclocker 阅读(142) 评论(0) 推荐(0) 编辑
摘要: 题目:Say you have an array for which the ith element is the price of a given stock on day i.Design an algorithm to find the maximum profit. You may comp... 阅读全文
posted @ 2015-11-26 12:25 lasclocker 阅读(133) 评论(0) 推荐(0) 编辑
摘要: 题目:Say you have an array for which the ith element is the price of a given stock on day i.If you were only permitted to complete at most one transacti... 阅读全文
posted @ 2015-11-25 18:12 lasclocker 阅读(195) 评论(0) 推荐(0) 编辑
摘要: 题目:Given an array containing n distinct numbers taken from 0, 1, 2, ..., n, find the one that is missing from the array.For example,Given nums = [0, 1... 阅读全文
posted @ 2015-11-22 20:58 lasclocker 阅读(123) 评论(0) 推荐(0) 编辑
摘要: 线段树(segment tree)是一种Binary Search Tree或者叫做ordered binary tree。对于线段树中的每一个非叶子节点[a,b],它的左子树表示的区间为[a,(a+b)/2],右子树表示的区间为[(a+b)/2+1,b]。如下图: ... 阅读全文
posted @ 2015-11-20 10:22 lasclocker 阅读(847) 评论(0) 推荐(0) 编辑
摘要: 题目:Additive number is a positive integer whose digits can form additive sequence.A valid additive sequence should contain at least three numbers. Exce... 阅读全文
posted @ 2015-11-19 16:05 lasclocker 阅读(390) 评论(0) 推荐(0) 编辑
摘要: 题目:Given a 2D matrix matrix, find the sum of the elements inside the rectangle defined by its upper left corner (row1, col1) and lower right corner (r... 阅读全文
posted @ 2015-11-14 19:47 lasclocker 阅读(1274) 评论(0) 推荐(0) 编辑
摘要: 题目:Given an integer array nums, find the sum of the elements between indices i and j (i ≤ j), inclusive.Example:Given nums = [-2, 0, 3, -5, 2, -1]sumR... 阅读全文
posted @ 2015-11-11 15:13 lasclocker 阅读(230) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 16 下一页