码迷,mamicode.com
首页 >  
搜索关键字:next permutation    ( 15663个结果
jQuery 之 setTimeout 传递字符串参数报错
当你打算调用一些jQuery代码显示隐藏的一个元素,并调用setTimeout()在一段延时之后设置其HTML的内容: 整个页面的代码是这样的. show next yes,I am the next function showNext(text){ setTimeout("$('#log').show().text(text)",1000); } .show...
分类:Web程序   时间:2014-06-10 13:26:58    阅读次数:196
hust 1260 Dominos && hust 1516 Dominos
题目描述Dominos are lots of fun. Children like to stand the tiles on their side in long lines. When one domino falls, it knocks down the next one, which k...
分类:其他好文   时间:2014-06-10 12:08:55    阅读次数:232
projecteuler---->problem=24----Lexicographic permutations
问题描述: A permutation is an ordered arrangement of objects. For example, 3124 is one possible permutation of the digits 1, 2, 3 and 4. If all of the permutations are listed numerically or alphabeti...
分类:其他好文   时间:2014-06-10 06:13:21    阅读次数:299
迭代器模式
定义 迭代器模式(Iterator Pattern)提供一种方法访问一个容器对象中各个元素,而又不需暴露该对象内部细节。 迭代器模式通用类图 Iterator抽象迭代器 抽象迭代器负责定义访问和遍历元素的接口,而且基本上是有固定的3个方法:First()获取第一个元素,Next()访问下一个元素,I...
分类:其他好文   时间:2014-06-09 20:55:24    阅读次数:316
[LeetCode] Copy List with Random Pointe
题目的关键是要让新链表和原有链表发送关联,可以通过这种关联来设置新链表的random pointer思路:将新链表的元素插入到原有链表元素的后面,如下图所示,就可以根据原有链表的radom->next 就是新链表的random指针所以分3步骤:1 新元素插入2 设置新链表的random3 拆分大链表...
分类:其他好文   时间:2014-06-09 17:59:33    阅读次数:202
求单链表的中间节点,用快慢指针
Node* findMid(Node* &head){ if(head == NULL||head->next == NULL) return head; Node* p = head; Node* q = head; while(q->next->ne...
分类:其他好文   时间:2014-06-09 17:55:34    阅读次数:204
逆序单链表
#include using namespace std;struct Node{ Node *next; int elem;};void creatList(Node* &head){ head = new Node; int elem; cin>>elem; ...
分类:其他好文   时间:2014-06-09 17:50:43    阅读次数:219
【HDOJ】1686 Oulipo
kmp算法。 1 #include 2 #include 3 4 char src[10005], des[1000005]; 5 int next[10005], total; 6 7 void kmp(char des[], char src[]){ 8 int ld = str...
分类:其他好文   时间:2014-06-09 17:46:37    阅读次数:264
不带头结点的单链表递归删除元素为X的结点
#include using namespace std;struct Node{ Node *next; int elem;};void creatList(Node* &head){ head = new Node; int elem; cin>>elem; ...
分类:其他好文   时间:2014-06-09 16:07:55    阅读次数:229
Java 单链表的倒置
在面试,笔试的过程中经常会遇到面试官问这种问题,实现单链表的倒置方法。现在对单链表的倒置犯法做个记录,方便自己以后查看。单链表的定义: 1 public class Node { 2 3 int v; 4 Node next; 5 public Node(){ ...
分类:编程语言   时间:2014-06-08 22:22:59    阅读次数:352
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!