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
可以检查参数,一直没注意这个语言特性,忽略了很多细节,感谢 vitrox
class Person( object ):
def __init__( self, name ):
if not isinstance( name, str ):
raise TypeError( '...' )
else:...
分类:
编程语言 时间:
2014-07-01 10:00:34
阅读次数:
181
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
经常在做webqq机器人,但是最头痛的问题就是腾讯经常加一些验证串来防止robot,现在共享出最新的腾讯密码加密算法和hash
算法
hash算法
def webqq_hash(i, a):
if isinstance(i, (str, unicode)):
i = int(i)
class b:
def __init__(self, _b,...
分类:
Web程序 时间:
2014-07-01 07:54:48
阅读次数:
272
题目
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
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view.
self.mapView = [[MKMapView alloc] initWithFrame:self.view.bounds];
self.mapView.mapType =...
分类:
其他好文 时间:
2014-07-01 06:17:34
阅读次数:
758