#include #include using namespace std;#define DESTROY_POINTER(ptr) if (ptr) { delete ptr; ptr = NULL; }class Observer{public: virtual void Update(s...
分类:
其他好文 时间:
2014-12-15 13:27:40
阅读次数:
112
#include using namespace std;#define DESTROY_POINTER(ptr) if (ptr) { delete ptr; ptr = NULL; }class TemplateMethod{public: void AlgorithmA() { Step...
分类:
其他好文 时间:
2014-12-15 10:19:26
阅读次数:
138
#include
#include
#include
#include
#define MAX_LETTERS 27
#define MAX_CHAR 30//字符串的长度
typedef enum {data,pointer}node_type;
typedef struct trie_node *trie_pointer;
struct trie_node...
分类:
其他好文 时间:
2014-12-12 19:14:17
阅读次数:
171
题目
A linked list is given such that each node contains an additional random pointer which could point to
any node in the list or null.
Return a deep copy of the list.
解答
题目要求拷贝一个链表,该链表除了一个next...
分类:
其他好文 时间:
2014-12-12 16:45:27
阅读次数:
210
#include #include using namespace std;#define SHARE_FLAG string#define DESTROY_POINTER(ptr) if (ptr) { delete ptr; ptr = NULL; }class Flyweight{public...
分类:
其他好文 时间:
2014-12-12 14:39:48
阅读次数:
155
这里是复制带有一个random指针的链表。是不是很熟悉啊。之前有做过克隆无向图的。那就借助leetcode Clone Graph的思路。分两次遍历链表,一次先复制普通的含next的,另一次就是复制random了。利用map记录,可以一次就找到想要的点。/** * Definition for si...
分类:
其他好文 时间:
2014-12-12 13:08:33
阅读次数:
141
#include #include using namespace std;#define DO_NOTHING()#define DESTROY_POINTER(ptr) if (ptr) { delete ptr; ptr = NULL; }class Component{ friend ...
分类:
其他好文 时间:
2014-12-12 11:15:31
阅读次数:
133
A linked list is given such that each node contains an additional random pointer which could point to any node in the list or null.Return a deep copy ...
分类:
其他好文 时间:
2014-12-12 06:40:38
阅读次数:
205
※函数的调用方式EBP:扩展基址指针寄存器(extended base pointer) 其内存放一个指针,该指针指向系统栈最上面一个栈帧的底部。ESP:(Extended stack pointer)是指针寄存器的一种,用于指向栈的栈顶。_cdecl:C/C++默认的调用方式,调用方平衡栈,不定参...
分类:
编程语言 时间:
2014-12-11 23:45:51
阅读次数:
404
css中cursor属性详解-鼠标移到图片变换鼠标形状 语法:cursor : auto | all-scroll | col-resize| crosshair | default | hand | move | help | no-drop | not-allowed | pointer | p...
分类:
Web程序 时间:
2014-12-11 17:12:44
阅读次数:
209