其他
1 class Solution { 2 public: 3 int maxSubArray(int A[], int n) { 4 int result = A[0], sum = A[0]; 5 for (int i = 1; i < n; i++) {...
分类:其他 时间:2015-03-21 06:21:04 收藏:0 阅读:334
【练习3.26】双端队列(deque)是由一些项的表组成的数据结构,对该数据结构可以进行下列操作:Push(X,D):将项X插入到双端队列D的前端。Pop(D):从双端队列D中删除前端项并返回。Inject(X,D):将项X插入到双端队列D的尾端。Eject(D):从双端队列D中删除尾端项并返回。编...
分类:其他 时间:2015-03-21 06:20:45 收藏:0 阅读:478
O(m + n):Note:return rec[1] not rec[0]. 1 class Solution { 2 public: 3 double findMedianSortedArrays(int A[], int m, int B[], int n) { 4 i...
分类:其他 时间:2015-03-21 06:20:34 收藏:0 阅读:368
Similar to maximum sum subarray, but need a gmin to record the global minimum to handle negative numbermultiplication. 1 class Solution { 2 public: 3 ...
分类:其他 时间:2015-03-21 06:19:54 收藏:0 阅读:319
This is the extension of Largest Rectangle in Histogram. We can just project 2D matrix to 1D array and compute it line by line. 1 class Solution { 2 p...
分类:其他 时间:2015-03-21 06:19:24 收藏:0 阅读:329
poj1159——回文,lcsPalindromeTime Limit:3000MSMemory Limit:65536KTotal Submissions:54621Accepted:18892DescriptionA palindrome is a symmetrical string, tha...
分类:其他 时间:2015-03-21 06:18:24 收藏:0 阅读:324
两个不同郁下的indexsync login hello,游客;请先登录hello,登入页面 跳到统一验证处验证sync login p3p共享sessionpassport完成跨域session<?phpsession_start();header('Content-Type:text/...
分类:其他 时间:2015-03-21 06:17:44 收藏:0 阅读:365
一、代理(Proxy)模式简介代理模式是结构型模式。代理模式给某一个对象提供一个代理对象,并由代理对象控制对原对象的引用。代理对象要继承于抽象主题,并控制原对象的引用二、简单例子抽象主题类package proxy;/* * 抽象主题 */public abstract class Subject ...
分类:其他 时间:2015-03-21 06:17:14 收藏:0 阅读:346
hduoj1159 dp,lcsCommon SubsequenceTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 25570Accepted Su...
分类:其他 时间:2015-03-21 06:17:04 收藏:0 阅读:384
分类分类的作用:在不改变原来类的基础上,可以给类增加一些方法。使用注意 : ① 分类只能增加方法,不可以增加成员变量 ② 分类的方法在实现中可以访问成员变量,不过成员变量必须手动实现。 ③ 分类可以从新实现原来类的方法,但是会覆盖原来类的方法,导致原来类的方法不可以使用。 ④ 方法调用的优先级:分类...
分类:其他 时间:2015-03-21 06:16:55 收藏:0 阅读:285
1136734136735136736166744
上一页1667435下一页
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!