AngularJS DirectivesDirectivesare one of the
most powerful ofAngularJS. They allow us to extend HTML to answer the needs of
web applications. Directiv...
分类:
Web程序 时间:
2014-05-17 15:26:40
阅读次数:
436
Givennnon-negative integersa1,a2, ...,an, where
each represents a point at coordinate (i,ai).nvertical lines are drawn such that
the two endpoints of ...
分类:
其他好文 时间:
2014-05-16 19:42:17
阅读次数:
286
SDUT集训计划假设已有C/C++/JAVA中任何一门程序设计语言基础,熟练掌握基本语法。Step1:入门hdu——water~,刷完Step2:数据结构——课本算法代码熟敲。数据结构需要掌握的内容(数据结构C语言版严蔚敏|吴伟民):第1章绪论算法和算法分析(时间复杂度分析和空间复杂度分析)第2章线...
分类:
其他好文 时间:
2014-05-16 05:25:47
阅读次数:
371
题目1:Best Time to Buy and Sell Stock
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 transaction (ie,...
分类:
其他好文 时间:
2014-05-16 01:46:15
阅读次数:
460
Problem Description
XX星有许多城市,城市之间通过一种奇怪的高速公路SARS(Super Air Roam Structure---超级空中漫游结构)进行交流,每条SARS都对行驶在上面的Flycar限制了固定的Speed,同时XX星人对 Flycar的“舒适度”有特殊要求,即乘坐过程中最高速度与最低速度的差越小乘坐越舒服 ,(理解为SARS的限速要求,flycar必须瞬间提...
分类:
其他好文 时间:
2014-05-16 01:43:49
阅读次数:
270
【题目】
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 a contain...
分类:
其他好文 时间:
2014-05-16 01:32:47
阅读次数:
406
题目
Given a non-negative number represented as an array of digits, plus one to the number.
The digits are stored such that the most significant digit is at the head of the list.
解答
本题考察进位问题,注...
分类:
其他好文 时间:
2014-05-15 04:16:56
阅读次数:
245
Container With Most Water...
分类:
其他好文 时间:
2014-05-15 02:29:03
阅读次数:
387
很有意思的题目,我一开始的思路受计算柱状型最大面积那道题的影响,想每次求两种满足特定关系的柱子之间的水的量,结果各种错,各种特殊情况需要排除,我意识到是自己的思路有问题了。
停下来想一下水的体积到底跟什么有关系?当然可以把是水的地方都加起来,这样必须看两个柱子之间的高低关系,还要考虑底部的高度。还有一种方法呢,求整个区域的面积,然后把不是水的地方去掉,剩下的就是水的体积。这种方法好在那里呢?这种...
分类:
移动开发 时间:
2014-05-14 14:12:33
阅读次数:
429
这道题做的比较艰辛,一开始自己想的是一个用stack的解法,感觉过于繁琐(出栈,入栈,计算容积),但未尝不是一个好的尝试,这个方法还是有点小问题,过后会好好想清楚。看了网上提示完成了最终的方法,这个方法两次遍历数组,第一次遍历找每个元素右边最大的元素,第二次遍历寻找每个元素左边最大的元素,同时计算该...
分类:
移动开发 时间:
2014-05-14 11:03:34
阅读次数:
412