Given an array where elements are sorted in ascending order, convert it to a height balanced BST. 1 /** 2 * Definition for binary tree 3 * public cl.....
分类:
其他好文 时间:
2014-09-26 13:49:58
阅读次数:
154
今天升级一个spring项目遇到如下错:HTTP Status 500 - Request processing failed; nested exception is org.apache.tiles.definition.DefinitionsFactoryException: I/O Erro...
分类:
编程语言 时间:
2014-09-25 21:23:17
阅读次数:
1032
题目:
Given a sorted linked list, delete all duplicates such that each element appear only once.
这道链表的题也比较简单,目标是为了去重,只是需要注意在去重的过程中需要使用while循环,使一个节点的下一个节点必须指向与其不同的节点
上代码咯
# Definition for singly-li...
分类:
其他好文 时间:
2014-09-25 18:39:57
阅读次数:
193
The purpose of a DTD (Document Type Definition) is to define the legal building blocks of an XML document.A DTD defines the document structure with a ...
分类:
其他好文 时间:
2014-09-25 03:36:38
阅读次数:
216
A Document Type Definition (DTD) defines the legal building blocks of an XML document. It defines the document structure with a list of legal elements...
分类:
其他好文 时间:
2014-09-25 02:34:48
阅读次数:
286
同num8一样,此题考查的是二叉树的中序遍历,即先左子树再节点再右子树、
使用迭代法时,采用将节点和左子树均压入栈的方法,当左子树为NULL时,将top节点弹出,并存入结果列表,将next指针指向该节点的右节点
代码如下:
/**
* Definition for binary tree
* struct TreeNode {
* int val;
* Tre...
分类:
其他好文 时间:
2014-09-24 20:04:07
阅读次数:
177
题目:Sort a linked list using insertion sort.代码: 1 /** 2 * Definition for singly-linked list. 3 * struct ListNode { 4 * int val; 5 * ListNod...
分类:
其他好文 时间:
2014-09-24 01:57:35
阅读次数:
227
题目:
Given a linked list, determine if it has a cycle in it.
Follow up:
Can you solve it without using extra space?
这是一道关于链表比较简单的题,很顺利就解决了,不多说啦,上代码啦
# Definition for singly-linked list.
# ...
分类:
其他好文 时间:
2014-09-22 22:07:03
阅读次数:
233
SQL(Structured Query Language)结构化查询语言,是一种高度非过程化的语言,其灵活易用完成核心操作仅需要9个动词,对有一点编程基础的人来说很容易上手。在我们做过的机房收费系统中主要用它来创建数据库并完成系统和数据库的交互。
基本功能:
数据定义(Data Definition):建立数据库和表的结构
数据管理(Data Management)...
分类:
数据库 时间:
2014-09-22 00:28:11
阅读次数:
228
Given a linked list, return the node where the cycle begins. If there is no cycle, return null.
Follow up:
Can you solve it without using extra space?
/**
* Definition for singly-linked list.
...
分类:
其他好文 时间:
2014-09-21 18:31:21
阅读次数:
233