Two elements of a binary search tree (BST) are swapped by mistake.
Recover the tree without changing its structure.
Note:
A solution using O(n)
space is pretty straight...
分类:
其他好文 时间:
2014-07-30 17:46:04
阅读次数:
244
/** SpringUtil.java{{IS_NOTE Purpose: Description: History: Thu Jun 1 13:53:53 2006, Created by henrichen}}IS_NOT...
分类:
编程语言 时间:
2014-07-30 03:15:32
阅读次数:
298
属性和特性操作元素属性jQuery没有用于获取或者修改元素属性的命令。需要利用javascript,首先需要做的就是获得元素的引用。each(function) 对包装集中的各个元素,进行function操作,function有默认的参数为当前元素的位置,function具有当前对象this的引用....
分类:
Web程序 时间:
2014-07-30 00:42:52
阅读次数:
333
(*
一般的清空combobox方法 combobox1.clear;
...
combobox9.clear;
*) procedure TForm1.Button1Click(Sender: TObject);
var i: integer;
begin for i:=0 to self.Com...
分类:
其他好文 时间:
2014-07-29 21:43:32
阅读次数:
690
描述:log(n)代码: 1 class Solution: 2 # @param x, an integer 3 # @return an integer 4 def getVal(self, begin, end, x): 5 if end == begi...
分类:
其他好文 时间:
2014-07-29 21:26:42
阅读次数:
263
将窗体资源分装到DLL中并且调用用Delphi生成DLL并封装窗体的示例调用Dll里面的窗体
DLL文件 library Project2;{ Important note about DLL memory management: ...
procedure TForm1.FormShow(Sender: TObject);begin ShowWindow(Application.handle, SW_HIDE); SetWindowLong(Self.handle, GWL_EXSTYLE, GetWindowLong(Self.h...
分类:
其他好文 时间:
2014-07-29 20:41:42
阅读次数:
218
php获取文件名$phpself =$_SERVER['PHP_SELF']; //获取当前文件名$str = end(explode("/",$phpself)); //去掉'/'echo $str.""; //输出文件全名echo substr($str,0,strrpos($str, '...
分类:
Web程序 时间:
2014-07-29 17:14:22
阅读次数:
225
-(void)shareWork:(id)sender{ UIActionSheet *share = [[UIActionSheet alloc] initWithTitle:nil delegate:self cancelButtonTitle:@"关闭" destructiveButtonT....
分类:
其他好文 时间:
2014-07-29 17:01:12
阅读次数:
273
描述:递归代码: 1 class Solution: 2 # @param num, a list of integers 3 # @return a tree node 4 def sortedArrayToBST(self, num): 5 if len(...
分类:
其他好文 时间:
2014-07-29 16:41:11
阅读次数:
210