码迷,mamicode.com
首页 >  
搜索关键字:head    ( 28286个结果
LRU cache.
Seehttp://blog.csdn.net/hexinuaa/article/details/6630384Node<T> { Tdata; Node<T>next; Node<T>pre; } Node<T>swapToHead(Node<T>head,Node<T>n) { if(n==head) returnn; Node<T>temp=n.next; n.next=temp; if(temp!=null)tem..
分类:系统相关   时间:2014-12-06 11:31:27    阅读次数:302
struct sk_buff结构体详解
structsk_buff是linux网络系统中的核心结构体,linux网络中的所有数据包的封装以及解封装都是在这个结构体的基础上进行。structsk_buff_head { structsk_buff*next; structsk_buff*prev; __u32qlen; spinlock_tlock; } structsk_buff { structsk_buff*next; structsk_buff*p..
分类:其他好文   时间:2014-12-06 06:42:38    阅读次数:575
【LeetCode】Remove Nth Node From End of List
题目 Given a linked list, remove the nth node from the end of list and return its head. For example, Given linked list: 1->2->3->4->5, and n = 2. After removing the second node from the ...
分类:其他好文   时间:2014-12-05 17:29:19    阅读次数:124
Scala 的list
9.1 使用列表 列表类型:跟数组一样,列表也是同质化的(homogeneous)。即所有元素都要是同种类型。 列表结构:所有列表由两部分组成:Nil 和 ::(cons)。 基本操作:主要有三个:head , tail , isEmpty 。这些都定义在List Object里。head 和...
分类:其他好文   时间:2014-12-05 14:16:30    阅读次数:287
Insertion Sort List
Sort a linked list using insertion sort. #include #include typedef struct ListNode { int val; struct ListNode *next; }ListNode; ListNode *insertionSortList(ListNode *head) { ListNode...
分类:其他好文   时间:2014-12-05 12:50:16    阅读次数:97
【Leetcode】【Easy】Remove Nth Node From End of List
Given a linked list, remove thenthnode from the end of list and return its head.For example, Given linked list: 1->2->3->4->5, and n = 2. After re...
分类:其他好文   时间:2014-12-05 07:05:34    阅读次数:191
去除字符串首部和尾部的空格
思路:记下第一个非空字符的位置temp1,记下头部空格的个数space_count_head以及尾部空格的个数space_count_tail。空格总数length_new=space_count_head+space_count_tail;将以temp1为起始位置,长度为length_new的字符...
分类:其他好文   时间:2014-12-05 00:28:01    阅读次数:259
JS总结
1.[代码]js总结 1.document.write("");输出语句2.JS中的注释为//3.传统的HTML文档顺序是:document->html->(head,body)4.一个浏览器窗口中的DOM顺序是:window->(navigator,screen,history,location....
分类:Web程序   时间:2014-12-04 17:50:39    阅读次数:258
LeetCode 2 :Swap Nodes in Pairs
我的代码是这样的:class Solution {public: ListNode *swapPairs(ListNode *head) { const int TRUE = 1; const int FALSE = 0; ListNod...
分类:其他好文   时间:2014-12-04 13:32:21    阅读次数:152
点击出大图
<!?DOCTYPE?html?PUBLIC?"-//W3C//DTD?XHTML?1.0?Transitional//EN"?"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">? <?html?xmlns?=?"http://www.w3.org/1999/xhtml"?>? <?head?...
分类:其他好文   时间:2014-12-04 12:25:05    阅读次数:144
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!