/**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode(int x) : val(x), next(NULL) {}
* };
*/
struct ListNode
{
int val;
ListNode *ne...
分类:
其他好文 时间:
2014-09-20 15:36:29
阅读次数:
152
Priority Queue
Definition & Description:
In computer
science/data structures, a priority queue is
an abstract data type which
is like a regular queue or stack data
str...
分类:
其他好文 时间:
2014-09-19 03:25:45
阅读次数:
301
Sort a linked list using insertion sort.难度:84. 我自己的做法是使用了额外的空间,建立了一个新的sorted的LinkedList, 技巧还是建立一个dummy node做前置节点。 1 /** 2 * Definition for singly-lin....
分类:
其他好文 时间:
2014-09-17 13:30:42
阅读次数:
264
很多RPC技术都会使用中间语言来定义接口描述,比如Web Service常用的WSDL, Thrift使用的IDL。
这类文件都是接口定义/描述语言 (Interface Definition/Description Language),有几个特点:
1. 采用中间语言来描述接口,以及接口使用到的数据结构(类)
2. 一般都采用文本文件,方便传递
3. 语法上可以使用XML,也可以...
分类:
其他好文 时间:
2014-09-17 12:15:02
阅读次数:
278
属性:Attributes 存储节点的属性列表(只读) childNodes 存储节点的子节点列表(只读) dataType 返回此节点的数据类型 Definition 以DTD或XML模式给出的节点的定义(只读) Doctype 指定文档类型节点(只读)...
分类:
Web程序 时间:
2014-09-15 19:09:09
阅读次数:
164
3.5 Bean scopes
When you create a bean definition, you create a recipe(配方) for creating actual(真实的,实际的) instances of the class defined by that bean definition. The idea(想法) that a bean de...
分类:
其他好文 时间:
2014-09-14 18:05:46
阅读次数:
297
Sort a linked list in O(n log n) time using constant space complexity./** * Definition for singly-linked list. * struct ListNode { * int val; * ...
分类:
其他好文 时间:
2014-09-13 21:25:35
阅读次数:
288
Sort a linked list inO(nlogn) time using constant space complexity. 1 /** 2 * Definition for singly-linked list. 3 * struct ListNode { 4 * int ...
分类:
其他好文 时间:
2014-09-13 20:08:05
阅读次数:
204
Given a linked list, determine if it has a cycle in it.Follow up:Can you solve it without using extra space? 1 /** 2 * Definition for singly-linked l....
分类:
其他好文 时间:
2014-09-13 20:06:35
阅读次数:
184
Sort a linked list using insertion sort. 1 /** 2 * Definition for singly-linked list. 3 * struct ListNode { 4 * int val; 5 * ListNode *nex...
分类:
其他好文 时间:
2014-09-13 20:05:15
阅读次数:
180