码迷,mamicode.com
首页 >  
搜索关键字:first    ( 14115个结果
Implement strStr()
Implement strStr().Returns a pointer to the first occurrence of needle in haystack, ornullif needle is not part of haystack.方法一:暴力破解,O(mn),超时,写了这段代码,估...
分类:其他好文   时间:2014-09-07 22:25:45    阅读次数:328
The 2014 ACM-ICPC Asia Mudanjiang Regional First Round
The Himalayashttp://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=5341签到 1 #include 2 int main(){ 3 int t,n,a[64]; 4 while(~scanf("%d",&...
分类:其他好文   时间:2014-09-07 21:00:25    阅读次数:321
Learn Python From 'Head First Python' [1] : The List
1.the concept of List2. how to define a method of myself3.how to iterator a listPS:for Step 2,3. it is related with a key word: 'def'. we define a fun...
分类:编程语言   时间:2014-09-07 21:00:15    阅读次数:229
LeetCode--Binary Tree Maximum Path Sum
递归,dfs这里返回值是一个pair,first表示两个子树的不经过当前root的最大pathsum;second表示两个子树的,以root->left和root->right为路径起始节点的路径的最大值 1 /** 2 * Definition for binary tree 3 * stru.....
分类:其他好文   时间:2014-09-07 19:43:15    阅读次数:195
The Himalayas(ZOJ)
/*The 2014 ACM-ICPC Asia Mudanjiang Regional First Round - A The Himalayas -------------------------------------------------------------------------------- Time Limit: 2 Seconds      Memory Limit: ...
分类:其他好文   时间:2014-09-07 18:36:25    阅读次数:228
Learn Python From 'Head First Python' [0] : Install
Python install
分类:编程语言   时间:2014-09-07 17:12:25    阅读次数:138
深度优先搜索算法(DFS)以及leetCode的subsets II
深度优先搜索算法(depth first search),是一个典型的图论算法。所遵循的搜索策略是尽可能“深”地去搜索一个图。算法思想是: 对于新发现的顶点v,如果它有以点v为起点的未探测的边,则沿此边继续探测下去。当顶点v的所有边都已被探寻结束,则回溯到到达点v的先辈节点。以相同方法一直回溯到源....
分类:其他好文   时间:2014-09-07 15:55:45    阅读次数:208
Spring-简单工厂模式感性认知
或许在开发的过程中可能会遇到诸如:     1. 不能预见创建哪一种类的实例。     2.不希望将类被如何创建或者哪一个类的实例被创建的相关信息暴露给用户。      package fh.first.factory; /* * Aim:简单的工厂模式 */ public class Factory { /* * name: getBean * str: cl...
分类:编程语言   时间:2014-09-07 14:50:15    阅读次数:199
用最简单的例子理解迭代器模式(Iterator Pattern)
迭代器模式的需求来自:需要对一些集合进行迭代,而迭代的方式可能有很多种。 说到迭代,动作大致包括设置第一个位置,获取下一个位置元素,判断是否迭代结束,获取当前位置元素,大致就这么些。把这些迭代动作封装到一个接口中。 public interface IIterator { void First();...
分类:其他好文   时间:2014-09-07 08:41:24    阅读次数:193
REST API初识及设计
网络应用程序,分为前端和后端两个部分。当前的发展趋势,就是前端设备层出不穷(手机、平板、桌面电脑、其他专用设备......)。因此,必须有一种统一的机制,方便不同的前端设备与后端进行通信。这导致API构架的流行,甚至出现"API First"的设计思想。RESTful API是目前比较成熟的一套互联...
分类:Windows程序   时间:2014-09-06 18:40:33    阅读次数:380
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!