原题地址:https://oj.leetcode.com/problems/best-time-to-buy-and-sell-stock-ii/题意:Say
you have an array for which theithelement is the price of a given stoc...
分类:
编程语言 时间:
2014-06-06 20:04:46
阅读次数:
400
基本原则:1.直观2.简捷3.不要省*****************************************************************************************---命名规则---常量名:大写,HAVE_ARCH_STRNCAT变量名:
1.英文...
分类:
其他好文 时间:
2014-06-06 15:36:59
阅读次数:
333
注意题目这句话,Once you have each type of candies in a
box, you want to pack those boxes into larger boxes, until only one box
remains.两个box合并后必须放入更大一个盒子题目的有...
分类:
其他好文 时间:
2014-06-06 13:09:50
阅读次数:
213
It happened in the iron and instantaneous
stuffy car, will have top, hydraulic automatic row material, greatly reduces the
original spring cone crushe...
分类:
其他好文 时间:
2014-06-06 10:45:06
阅读次数:
310
The Actor is the unit of execution in Akka.
Actors are object-oriented in the sense that they encapsulate state and
behavior, but they have much stron...
分类:
其他好文 时间:
2014-06-06 10:37:41
阅读次数:
344
题意:求区间内不含62和4的数的个数;
解法:数位dp。int dfs(int pos,int pre,bool limit,bool have),pos表示dp到的数位位置,pre表示前一个数位的数字,limit表示到此时数是否有下降(此位取数字是否受限制的意思),have表示之前是否有62;4的排除是靠在每次枚举下一位i时不取4即可;每个case的dp值都是一样的,所以只需要计算一遍...
分类:
其他好文 时间:
2014-06-02 18:59:28
阅读次数:
315
Lotto
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 1411 Accepted Submission(s): 697
Problem Description
In a Lotto I have eve...
分类:
其他好文 时间:
2014-06-02 18:52:53
阅读次数:
396
Best Time to Buy and Sell Stock IISay you have
an array for which theithelement is the price of a given stock on dayi.Design an
algorithm to find the ...
分类:
其他好文 时间:
2014-06-02 15:01:53
阅读次数:
305
【题目】
Given two binary trees, write a function to check if they are equal or not.
Two binary trees are considered equal if they are structurally identical and the nodes have the same value.
【题意】
判断了两个二叉树是否相等
【思路】
递归...
分类:
其他好文 时间:
2014-06-02 11:03:03
阅读次数:
205
问题:
Given a collection of numbers that might contain duplicates, return all possible unique permutations.
For example,
[1,1,2] have the following unique permutations:
[1,1,2], [1,2,1],
and...
分类:
其他好文 时间:
2014-06-01 13:03:12
阅读次数:
324