码迷,mamicode.com
首页 >  
搜索关键字:__next__    ( 15001个结果
reverse a linked-list(C++)
#includeusing namespace std;class Node{public: Node(int value) : value(value), next(NULL) {}public: int value; Node* next;};Node* reverseList...
分类:编程语言   时间:2014-06-27 20:02:00    阅读次数:253
单链表处理注意事项
单链表的节点结构一般如下:struct Node{ int val; Node* next;};在处理单链表的基本操作要注意以下事项:1、记住头节点单链表的每个操作都要从头节点开始。如果函数内头节点发生了改变,比如在头节点之前插入节点,删除头节点,反转链表等,都需要更新头节点...
分类:其他好文   时间:2014-06-27 19:46:49    阅读次数:368
Eclipse导出Java代码API
1.选择工程菜单Project->Genarate Javadoc 2.选择工程鼠标右键菜单Export 选择Java 下面Javadoc 点next 按钮 3.选择工程菜单File->Export 选择Java 下面Javadoc 点next 按钮 选择生成Javadoc 文档内容( 般选publ...
分类:编程语言   时间:2014-06-26 19:01:00    阅读次数:301
职责链模式之C++实现
#include"stdafx.h"#includeusingnamespacestd;classProgrammer{protected:Programmer*next;public:voidSetNext(Programmer*programmer){next=programmer;}virtu...
分类:编程语言   时间:2014-06-26 16:08:31    阅读次数:228
LeetCode: Gas Station [134]
【题目】 There are N gas stations along a circular route, where the amount of gas at station i is gas[i]. You have a car with an unlimited gas tank and it costs cost[i] of gas to travel from station i to its next station (i+1). You begin the journey with an ...
分类:其他好文   时间:2014-06-26 13:27:05    阅读次数:231
hdu1671Phone List(字典树)
#include #include #include #include using namespace std; typedef struct Node { struct Node *next[10]; int flag; }Node,*Tree; int flag1; void Cre...
分类:其他好文   时间:2014-06-25 11:27:43    阅读次数:154
hdu1027 Ignatius and the Princess II 全排列
STL中的神器next_permutation和prev_permutation函数 全排列...
分类:其他好文   时间:2014-06-24 22:41:03    阅读次数:271
图存储-前向星
//前向星是将所有的边进行编号,每个节点u的边集合通过head[u]来找到u的第一条边,//再通过next[head[u]]依次遍历节点u的所有边。int head[maxn]; int to[maxn*2];int next[maxn*2];int cnt = 0;//边的编号 memset(h....
分类:其他好文   时间:2014-06-24 22:08:22    阅读次数:164
LCA-倍增法(在线)O(nlogn)-O(logn)
1.DFS预处理出所有节点的深度和父节点inline void dfs(int u){ int i; for(i=head[u];i!=-1;i=next[i]) { if (!deep[to[i]]) { ...
分类:其他好文   时间:2014-06-24 20:23:57    阅读次数:251
将JDBC ResultSet结果集转成List
ResultSet简介:ResultSet包含符合SQL语句中条件的所有行,并且它通过一套get方法(这些get方法可以访问当前行中的不同列) 提供了对这些行中数据的访问。ResultSet.next方法用于移动到ResultSet中的下一行,使下一行成为当前行。 上面的rs.getObject(i) 即是获得这一行的数据值 ResultSetMetaData rsmd=rs.getMetaData(); 1、getColumCount()方法 返回所有字段的数目 2、getColumName(...
分类:数据库   时间:2014-06-24 19:08:22    阅读次数:297
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!