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 ...
分类:
其他好文 时间:
2015-01-24 17:10:49
阅读次数:
237
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. 这题 是靠http://www.cnblogs.com/zuo...
分类:
其他好文 时间:
2015-01-24 11:38:29
阅读次数:
159
// main.m// 1-22课堂笔记// 讲师: 小辉// 笔者: 王学文// Created by lanouhn on 15/1/22.// Copyright (c) 2015年 lanouhn. All rights reserved.// pointer(指针)#import int ...
分类:
编程语言 时间:
2015-01-22 21:39:30
阅读次数:
253
智能指针(smart pointer)是存储指向动态分配(堆)对象指针的类,用于生存期控制,能够确保自动正确的销毁动态分配的对象,防止内存泄露。它的一种通用实现技术是使用引用计数(reference count)。智能指针类将一个计数器与类指向的对象相关联,引用计数跟踪该类有多少个对象共享同一指针。...
分类:
编程语言 时间:
2015-01-22 17:47:34
阅读次数:
323
Is a loop ? Question descrip as follows :
Assume that wehave a head pointer to a link-list. Also assumethat we know the list is single-linked. Can you come up an algorithm to checkwhether this link list includes a loop by using O(n) time and O(1) ...
分类:
其他好文 时间:
2015-01-22 13:28:16
阅读次数:
229
在C++中,程序员可以直接操作内存,给编程增加了不少的灵活性。但是灵活性是有代价的,程序员必须负责自己负责释放自己申请的内存,否则就会出现内存泄露。智能指针就是为了解决这个问题而存在的。它和其他指针没有本质的区别,主要的目的就是为了避免悬挂指针、内存泄露的问题。在这里,我使用对象的应用计数做了一个s...
分类:
编程语言 时间:
2015-01-22 10:46:12
阅读次数:
236
小测试看看你理解对几个:char **argv argv: pointer to char array int (*daytab)[13] daytab: pointer to array[13] of intint *daytab[13] daytab: array[13] o...
分类:
其他好文 时间:
2015-01-22 01:30:57
阅读次数:
173
1.MD5代码实现
HMAC.H即MD5头文件。
#ifndef HMAC_H
#define HMAC_H
// POINTER defines a generic pointer type
typedef unsigned char *POINTER;
// UINT2 defines a two byte word
typedef unsigned short int UINT2...
分类:
编程语言 时间:
2015-01-22 00:24:41
阅读次数:
255
链接:va_list百科1:概述VA_LIST 是在c语言中解决变参问题的一组宏,所在头文件:#include 2:成员#ifdef _M_ALPHAtypedef struct {char *a0; /* pointer to first homed integer argument */int ...
分类:
其他好文 时间:
2015-01-21 21:53:42
阅读次数:
143
8.1题 1 #include 2 void silly(const char * s,int n = 0); 3 int main() 4 { 5 char *pointer = "lala"; 6 silly("hello?"); 7 for(int i = 0; i ...
分类:
其他好文 时间:
2015-01-20 22:08:55
阅读次数:
190