
基础
shcalm
这个作者很懒,什么都没留下…
展开
-
链表反转
面试里面的另外一个特别容易出的题目 反转链表void reverselist(node** head){ if(*head == NULL) return ; node* pre = NULL; node* cur = *head; node* next = *head; while(cur){ next = cur->n原创 2014-02-24 14:23:00 · 1035 阅读 · 0 评论 -
多项式加法
前些日子面试,让写个多项式加法,写了半天也有bug,我觉得很丢脸,要多多练习写代码 多项式加法 是按照序数从高到低排序,并且指数前面参数不能小于0(自己设定的)typedef struct node{ int value; int n; struct node* next;}linknode;linknode* add(linknode* A,li原创 2014-02-17 14:21:45 · 1412 阅读 · 0 评论 -
sip over tcp or udp
1 with TCP Sender: SIP message is not limited in its size. When user calls system call to send SIP message, this message can be divided into more than 1 TCP segment depending on window size of rec转载 2014-04-14 11:03:21 · 4317 阅读 · 0 评论 -
写bug-free 的code
一个算法题目 写的没有bug,是件不容易的事情必须要考虑全面,其实就是你算法过程中,每个变量是否适用,你的算法是在什么样的前提下面展开的这个和参数检查是另外一件事情,参数检查被说的好像是一个必须要做的过程,其实这个跟具体实现由关系如果具体实现无关参数,那就不需要做什么参数检查比方说 很多时候都要检查传入参数是不是null,如果函数要取这个地址的值,那必须要检查这个指针是否是null原创 2014-10-28 14:26:05 · 1345 阅读 · 0 评论 -
2014年11月4日
1 http://beej.us/guide/bgnet/output/html/multipage/theory.htmla simple http server from scratch2原创 2014-11-06 20:31:22 · 758 阅读 · 0 评论