原题地址:https://oj.leetcode.com/problems/anagrams/题意:Given
an array of strings, return all groups of strings that are anagrams.Note: All
inputs will be i...
分类:
编程语言 时间:
2014-06-29 13:25:28
阅读次数:
355
题目
Given preorder and inorder traversal of a tree, construct the binary tree.
Note:
You may assume that duplicates do not exist in the tree.
方法
根据树的中序遍历和前序遍历,来构造树,使用递归的思想。
Tre...
分类:
其他好文 时间:
2014-06-20 12:14:49
阅读次数:
262
题目
Given a binary tree, return the inorder traversal of its nodes' values.
For example:
Given binary tree {1,#,2,3},
1
2
/
3
return [1,3,2].
Note: Recur...
分类:
其他好文 时间:
2014-06-20 10:22:00
阅读次数:
221
题目
Given inorder and postorder traversal of a tree, construct the binary tree.
Note:
You may assume that duplicates do not exist in the tree.
方法
根据树的中序遍历和后序遍历,来恢复树,使用递归的思想。
Tr...
分类:
其他好文 时间:
2014-06-07 14:50:37
阅读次数:
231
1 基本用法
添加观察(可能很多页面)
[[NSNotificationCenter
defaultCenter] addObserver:self
selector:@selector(changeIntlCode:)
name:NOTIFICATION_SUCCESS_SELECT_INTLCODE
object:nil];
发出通知(可能只有一个页面)
...
分类:
移动开发 时间:
2014-06-07 13:37:38
阅读次数:
223
if (self.tableView.contentSize.height >
self.tableView.frame.size.height) { CGPoint offset = CGPointMake(0,
self.tableView.contentSize.heig...
分类:
其他好文 时间:
2014-06-07 08:40:38
阅读次数:
187
通常情况下,如果我们要使用一个类的方法,那我们只能将一个类实体化成一个对象,进而调用对象使用方法。比如: class Hello(object): def
__init__: ... def print_hello(self): print "Hello" 要用 ...
分类:
编程语言 时间:
2014-06-07 07:44:56
阅读次数:
218
1、首先在官方网站(点击可以下载)下载最新的JDK,要选用self extracting
installer2、在/usr/下新建java目录,把下载的文件放到这个目录下sudo mkdir /usr/javacd
/usr/java3、更改这个文件的权限,使其可以运行: weijie@weijie...
分类:
编程语言 时间:
2014-06-06 06:46:20
阅读次数:
363
This is the beginning of my plan. Or this is a
manifesto, a motivation for me. Note what I read, good or bad, old or new, Tao
or method. Maybe sometim...
分类:
其他好文 时间:
2014-06-05 15:57:51
阅读次数:
373
from xml.etree import ElementTreeclass
CommentedTreeBuilder ( ElementTree.XMLTreeBuilder ): def __init__ ( self, html =
0, target = None ): ...
分类:
编程语言 时间:
2014-06-05 13:16:31
阅读次数:
261