摘要: http://coolshell.cn/articles/5426.html一、打开文件、保存、关闭文件(vi命令模式下使用)vi filename //打开filename文件:w //保存文件:w vpser.net //保存至vpser.net文件:q //退出编辑器,如果文件已修改请使用下面的命令:q! //退出编辑器,且不保存:wq //退出编辑器,且保存文件二、插入文本或行(vi命令模式下使用,执行下面命令后将进入插入模式,按ESC键可退出插入模式)a //在当前光标位置的右边添加文本i //在当前光标位置的左边添加文本A //在当前行... 阅读全文
posted @ 2013-03-07 11:54 cradle 阅读(208) 评论(0) 推荐(0) 编辑
摘要: 新建“Java_Home”,设置其值为JDK所在的绝对路径(例如D:\ProgramFiles\Java\jdk1.7)新建“Classpath”(如果已有,则直接编辑),设置其值为.;%Java_Home%\lib(若值中原来有内容,用分号与之隔开, 路径前的符号为.;不能漏掉)新建“Path”(如果已有,则直接编辑),值:%Java_Home%\bin;(若值中原来有内容,用分号与之隔开) 阅读全文
posted @ 2013-03-07 09:29 cradle 阅读(170) 评论(0) 推荐(0) 编辑
摘要: Given a sorted linked list, delete all duplicates such that each element appear onlyonce.For example,Given1->1->2, return1->2.Given1->1->2->3->3, return1->2->3.Solution: 1 /** 2 * Definition for singly-linked list. 3 * public class ListNode { 4 * int val; 5 * ListNode next 阅读全文
posted @ 2013-01-30 16:41 cradle 阅读(150) 评论(0) 推荐(0) 编辑
摘要: all kinds of traversals for binary tree 阅读全文
posted @ 2013-01-30 02:38 cradle 阅读(865) 评论(0) 推荐(0) 编辑
摘要: Given n, generate all structurally unique BST's (binary search trees) that store values 1...n. 阅读全文
posted @ 2013-01-29 09:55 cradle 阅读(1895) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level). 阅读全文
posted @ 2013-01-29 09:19 cradle 阅读(226) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level from leaf to root). 阅读全文
posted @ 2013-01-29 09:07 cradle 阅读(214) 评论(0) 推荐(0) 编辑
摘要: Given an array where elements are sorted in ascending order, convert it to a height balanced BST. 阅读全文
posted @ 2013-01-29 08:02 cradle 阅读(462) 评论(0) 推荐(0) 编辑
摘要: Two elements of a binary search tree (BST) are swapped by mistake.Recover the tree without changing its structure. 阅读全文
posted @ 2013-01-28 09:45 cradle 阅读(551) 评论(0) 推荐(0) 编辑
摘要: Given two binary trees, write a function to check if they are equal or not. 阅读全文
posted @ 2013-01-28 08:43 cradle 阅读(222) 评论(0) 推荐(0) 编辑