Given an array of non-negative integers, you are initially positioned at the first index of the array.
Each element in the array represents your maximum jump length at that position.
Determine i...
分类:
其他好文 时间:
2014-10-09 16:59:57
阅读次数:
203
这道题真真是在面试中碰到过,可惜当时复杂度到O(n2)了,太挫了,怪不得没有通过面试。
Given n non-negative integers a1, a2,
..., an, where each represents a point at coordinate (i, ai). n vertical
lines are drawn such that the two en...
分类:
编程语言 时间:
2014-10-09 01:58:17
阅读次数:
229
题目描述:Givennnon-negative integersa1,a2, ...,an, where each represents a point at coordinate (i,ai).nvertical lines are drawn such that the two endpoint...
分类:
其他好文 时间:
2014-09-30 00:30:11
阅读次数:
211
Given a binary tree containing digits from 0-9 only, each root-to-leaf
path could represent a number.
An example is the root-to-leaf path 1->2->3 which represents the number 123.
Find the tota...
分类:
其他好文 时间:
2014-09-28 18:02:24
阅读次数:
182
首先介绍一下什么是ol元素。这里直接引用MDN里面的定义:The HTML Element (or HTML Ordered List Element) represents an ordered list of items.也就是说这个元素的包含的li元素是带有数字序号的。为了更好阐述下面介...
分类:
其他好文 时间:
2014-09-26 22:47:08
阅读次数:
453
-----QUESTION-----
Given n non-negative integers a1, a2,..., an,where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai)and (i,0). Find two lines, which together with x-axis forms ...
分类:
其他好文 时间:
2014-09-24 20:39:27
阅读次数:
218
We have used many of Python’s built-in types; now we are going to define a new type. As an example, we will create a type called Point that represents...
分类:
其他好文 时间:
2014-09-24 01:28:45
阅读次数:
308
Start here: portal to the lectures(每一天都对应一个链接,包含videos 和materials)Each of the pages linked below represents one day of the school, and contains the li...
分类:
其他好文 时间:
2014-09-23 23:21:05
阅读次数:
290
Given an array of non-negative integers, you are initially positioned at the first index of the array.
Each element in the array represents your maximum jump length at that position.
Your goal i...
分类:
其他好文 时间:
2014-09-23 20:15:26
阅读次数:
142
【题目】
Given a binary tree containing digits from 0-9 only, each root-to-leaf
path could represent a number.
An example is the root-to-leaf path 1->2->3 which represents the number 123.
Fin...
分类:
其他好文 时间:
2014-09-22 19:30:53
阅读次数:
175