Sort a linked list using insertion sort.题目意思是用插入排序对单链表进行排序,做法是返回一个新的单链表,每次插入的时候都添加一个新建的节点。/** * Definition for singly-linked list. * public class List...
分类:
其他好文 时间:
2014-09-13 15:54:15
阅读次数:
233
递归 1 /** 2 * Definition for binary tree 3 * struct TreeNode { 4 * int val; 5 * TreeNode *left; 6 * TreeNode *right; 7 * TreeNode...
分类:
其他好文 时间:
2014-09-12 11:36:23
阅读次数:
183
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-11 22:18:12
阅读次数:
311
SELECT A.NAME FROM SYS.ALL_OBJECTS A,SYS.SQL_MODULES B
WHERE A.IS_MS_SHIPPED=0 AND A.OBJECT_ID = B.OBJECT_ID AND A.[TYPE] IN ('P','V','AF')
AND [DEFINITION] LIKE '% %'--存储过程包含的关键字
ORDER BY A.[NAME] ...
分类:
数据库 时间:
2014-09-11 09:40:01
阅读次数:
191
1 SELECT definition 2 FROM sys.sql_modules JOIN sys.objects 3 ON sys.sql_modules.object_id=sys.objects.object_id 4 and type='P' 5 and sys.objects...
分类:
数据库 时间:
2014-09-10 15:35:40
阅读次数:
269
错误:Duplicate interface definition for class "类名称"原因:在工程中有相同的文件或相同的 @interface 类名称解决办法: 可以把其中一个 @interface 类名称 标记为分类 @interface MX (分类名称) //分类名称可省去,...
分类:
其他好文 时间:
2014-09-10 13:56:00
阅读次数:
192
1 /** 2 * Definition for binary tree 3 * public class TreeNode { 4 * int val; 5 * TreeNode left; 6 * TreeNode right; 7 * TreeNo...
分类:
其他好文 时间:
2014-09-10 01:35:19
阅读次数:
221
递归,dfs这里返回值是一个pair,first表示两个子树的不经过当前root的最大pathsum;second表示两个子树的,以root->left和root->right为路径起始节点的路径的最大值 1 /** 2 * Definition for binary tree 3 * stru.....
分类:
其他好文 时间:
2014-09-07 19:43:15
阅读次数:
195
用两个队列实现,交叉使用,达到判断层的目的 1 /** 2 * Definition for binary tree 3 * struct TreeNode { 4 * int val; 5 * TreeNode *left; 6 * TreeNode *right...
分类:
其他好文 时间:
2014-09-06 23:47:44
阅读次数:
261
1. 文档DTD文档类型定义(Document Type Definition,简称DTD)它包含了元素的定义规则、元素间关系的定义规则,元素可使用的属性、可使用的实体或符号规则。没有DTD定义的时候,IE6/7/8会触发怪异模式,firefox依然是标准模式。为了让所有浏览器都以统一的标准去解析和...
分类:
其他好文 时间:
2014-09-05 14:11:11
阅读次数:
147