题目:
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.
思路:
主要是深层复制的问题:
本题比较简...
分类:
其他好文 时间:
2014-05-07 02:44:38
阅读次数:
344
一,带函数Pred 1, all(Pred, List) ->
boolean()如果List中的每个元素作为Pred函数的参数执行,结果都返回true,那么all函数返回true,
否则返回false例子:lists:all(fun(E) -> true end,[1,2,3,4]).结果true...
分类:
其他好文 时间:
2014-05-07 01:59:17
阅读次数:
552
1.流与FILE对象unix
I/O系统调用都是针对文件描述符的标准C的I/O函数都是针对流(文件指针)的,我们使用一个流与一个文件相关联2.缓冲标准I/O库提供缓冲的目的就是尽可能减少read和write系统调用的使用次数标准I/O提供三种类型的缓冲:(1)
全缓冲:在填满标准I/O缓冲区后才进行...
分类:
其他好文 时间:
2014-05-07 01:35:27
阅读次数:
321
写时拷贝(copy-on-write) COW技术...
分类:
其他好文 时间:
2014-05-06 23:42:43
阅读次数:
270
【题目】
原文:
1.4 Write a method to decide if two strings are anagrams or not.
译文:
写一个函数判断两个字符串是否是变位词。
【分析】
变位词(anagrams)指的是组成两个单词的字符相同,但位置不同的单词。比如说, abbcd和abcdb就是一对变位词。该题目有两种思路:
【思路一】
由于变位词只是字...
分类:
其他好文 时间:
2014-05-06 23:17:56
阅读次数:
383
Chef develops his own computer program for playing chess. He is at the very beginning. At first he needs to write the module that will receive moves written by the players and analyze it. The module w...
分类:
其他好文 时间:
2014-05-06 23:11:26
阅读次数:
497
G++ 2.91.57,cygnus\cygwin-b20\include\g++\stl_queue.h 完整列表
/*
*
* Copyright (c) 1994
* Hewlett-Packard Company
*
* Permission to use, copy, modify, distribute and sell this software
* and its document...
分类:
其他好文 时间:
2014-05-06 22:22:55
阅读次数:
402
右键New->Other->AndroidSampleProject->选择Android4.4.2->选择Support7Demos,finish。会出现编译错误解决如下:1.把这三个文件导入到Eclipse里,这三个是库文件,并且勾选COPY到工作空间里选项如果没有这三个文件,就从这里下载2.导入三个library工程后,mediar..
分类:
其他好文 时间:
2014-05-06 20:34:11
阅读次数:
864
工欲善其事,必先利其器。对IDE的熟练程度,真能影响开发效率 。
先普及下常识,以后有新的收获再补充。
最常用快捷键:
Ctrl+E Delete current line
Ctrl-Shift-Up/D Copy lines up/down
Ctrl-/ Add/remove comment lines
Alt-Shift-F Format select...
分类:
Web程序 时间:
2014-05-06 19:54:58
阅读次数:
486