题目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
原题:
题目解析:这个问题的实质是要我们按成访问二叉树的结点,并返回每层访问的结果,这里要求走Z字,其实就是一行正向一行反向。
/*
the kernel idea is visit a binary search tree in level and
the additional work we have to label the end of one level.
*/
v...
分类:
其他好文 时间:
2014-05-15 23:18:46
阅读次数:
515
介绍ViewFlipper
ViewFlipper
Simple ViewAnimator that will animate between two or more views that have been added to it. Only one child is shown at a time. If requested, can automatically flip betwee...
分类:
其他好文 时间:
2014-05-15 18:37:44
阅读次数:
356
The modernization of world had led to coming of
many businesses online. Businesses have realized the importance of coming up
online. That is the main ...
分类:
其他好文 时间:
2014-05-15 10:14:55
阅读次数:
364
原文出处:http://www.lornajane.net/posts/2014/working-with-php-and-beanstalkdWorking
with PHP and BeanstalkdI have just introduced Beanstalkd into my curre...
分类:
Web程序 时间:
2014-05-15 07:35:01
阅读次数:
415
Description
Businesses like to have memorable telephone numbers. One way to make a telephone number memorable is to have it spell a memorable word or phrase. For example, you can call the Universit...
分类:
其他好文 时间:
2014-05-15 00:20:39
阅读次数:
332
Best Time to Buy and Sell Stock1Say you have an
array for which theithelement is the price of a given stock on dayi.If you were
only permitted to comp...
分类:
其他好文 时间:
2014-05-14 22:36:11
阅读次数:
353
Total Accepted: 8400 Total Submissions: 38235 My Submissions
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 profi...
分类:
其他好文 时间:
2014-05-14 19:39:53
阅读次数:
275
题意:求1-n(n
解法:数位dp。LL dp[pre][now][have][iflow][rem]记录着第pre位为now,have表示前边是否出现过13,iflow表示dp过程否有降低,rem表示后续需要的余数是多少。
代码:/******************************************************
* author:xiefubao
...
分类:
其他好文 时间:
2014-05-14 19:29:37
阅读次数:
266
[root@OpenSIPSopensips-1.11.1-tls]#makemenuconfigcdmenuconfig;make;cd..make[1]:Enteringdirectory`/usr/local/opensips-1.11.1-tls/menuconfig‘gcc-g-Wall-DMENUCONFIG_CFG_PATH=\"menuconfig/configs/\"-DMENUCONFIG_GEN_PATH=\"etc/\"-DMENUCONFIG_HAVE_SOURCES=1-c-ocf..
分类:
其他好文 时间:
2014-05-14 16:07:32
阅读次数:
341