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 maximu...
分类:
其他好文 时间:
2014-05-19 08:07:26
阅读次数:
288
题目:合并两个有序单链表思路:一开始想复杂了,以为必须在原链表上修改(绕来绕去还AC了,但是思路相当绕),其实没有,按照正常地合并两个数组同样的方法也对。代码:public
ListNode mergeTwoLists(ListNode l1, ListNode l2) { if(l1 ...
分类:
其他好文 时间:
2014-05-19 07:48:32
阅读次数:
314
Say you have an array for which theithelement
is the price of a given stock on dayi.If you were only permitted to complete at
most one transaction (ie...
分类:
其他好文 时间:
2014-05-18 20:30:16
阅读次数:
301
Working with SubscriptionsApps that use
subscriptions have some additional behaviors and considerations. Because
subscriptions incorporate an element ...
分类:
移动开发 时间:
2014-05-18 19:49:05
阅读次数:
548
Given a stringS, find the longest palindromic
substring inS. You may assume that the maximum length ofSis 1000, and there
exists one unique longest pa...
分类:
其他好文 时间:
2014-05-18 19:39:55
阅读次数:
355
Do you know how to write the for-loop
efficiently? Read this to get it. :)
分类:
编程语言 时间:
2014-05-18 19:24:37
阅读次数:
382
试了不少方法,最后还是这个最有效。[转自:http://thatsimplecode.com/install-mongodb-driver-for-php-on-xampp-for-mac-osx]You
need to have the following installed in your Ma...
分类:
数据库 时间:
2014-05-18 19:10:28
阅读次数:
305
Given a linked list and a value x, partition it
such that all nodes less than x come before nodes greater than or equal to x.You
should preserve the o...
分类:
其他好文 时间:
2014-05-18 02:34:57
阅读次数:
352
Given a triangle, find the minimum path sum
from top to bottom. Each step you may move to adjacent numbers on the row
below.For example, given the fol...
分类:
其他好文 时间:
2014-05-18 02:11:19
阅读次数:
302
Given two numbers represented as strings,
return multiplication of the numbers as a string.Note: The numbers can be
arbitrarily large and are non-nega...
分类:
其他好文 时间:
2014-05-18 01:25:07
阅读次数:
288