Given a binary tree, return theinordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3return[1,3,2].Note...
分类:
其他好文 时间:
2014-07-02 22:49:05
阅读次数:
249
函数和闭包1 成员方法java中函数存在的方式,我们给一个类追加一个功能的途径就是给他追加一个方法。2 本地方法所谓的本地方法就是存在于一个方法内部的方法。如果一个类中有一个方法是private的,且只有一个方法使用到他,那么这个方法完全可以被定义为一个本地方法3 函数式一等公民方法分为:1 方法名...
分类:
其他好文 时间:
2014-07-02 21:29:31
阅读次数:
217
1操作系统接口os模块提供了一系列与系统交互的模块:>>> os.getcwd() # Return the current working directory'/home/minix/Documents/Note/Programming/python/lib1'>>> os.chdir('~/p....
分类:
编程语言 时间:
2014-07-01 14:07:44
阅读次数:
249
Sorted Array:Given two sorted integer arrays A and B, merge B into A as one sorted array.Note:You may assume that A has enough space (size that is gre...
分类:
其他好文 时间:
2014-07-01 12:51:53
阅读次数:
202
Given an array of strings, return all groups of strings that are anagrams.
Note: All inputs will be in lower-case.
回文字符串是指: 两个字符串的字符个数完全相同,这两个字符串是Anagrams。因此Anagrams至少指俩字符串。找出字符集合中的Anagrams组。...
分类:
其他好文 时间:
2014-07-01 08:42:11
阅读次数:
250
题目
Given a binary tree, return the preorder traversal of its nodes' values.
For example:
Given binary tree {1,#,2,3},
1
2
/
3
return [1,2,3].
Note: Recu...
分类:
其他好文 时间:
2014-07-01 07:06:56
阅读次数:
177
题目
Given a binary tree, return the postorder traversal of its nodes' values.
For example:
Given binary tree {1,#,2,3},
1
2
/
3
return [3,2,1].
Note: Rec...
分类:
其他好文 时间:
2014-07-01 07:06:11
阅读次数:
214
Note: It may need root user permissions to execute following commands.
(1) Install needed packages
yum install mod_dav_svn subversionIn my PC, packages that were installed are
Note: if you are goi...
分类:
其他好文 时间:
2014-07-01 06:38:19
阅读次数:
397
题目
Given an array of integers, every element appears twice except for one. Find that single one.
Note:
Your algorithm should have a linear runtime complexity. Could you implement it witho...
分类:
其他好文 时间:
2014-07-01 06:24:42
阅读次数:
204
题目
Given an array of integers, every element appears three times except for one. Find that single one.
Note:
Your algorithm should have a linear runtime complexity. Could you implement it...
分类:
其他好文 时间:
2014-07-01 06:23:24
阅读次数:
334