- 博客(6)
- 资源 (11)
- 收藏
- 关注
原创 Leecode_Count Primes
Problem: Count the number of prime numbers less than a non-negative number, n. Hint: Let's start with a isPrime function. To determine if a number is prime, we need to check if it is not di
2015-10-13 13:42:27 177
原创 Leecode_Peeking Iterator
This problem mainly practices the implementing of the interface. Problem: Given an Iterator class interface with methods: next() and hasNext(), design and implement a PeekingIterator that suppo
2015-09-24 08:25:44 155
原创 Leecode_Single Number
The Problem: 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
2015-08-25 07:01:58 178
原创 Leecode_Missing number
The Problem: Given an array containing n distinct numbers taken from 0, 1, 2, ..., n, find the one that is missing from the array. For example, Given nums = [0, 1, 3] return 2. Note: Yo
2015-08-25 06:23:50 179
转载 python中%s和%r的区别
如例: test = """hello,\nworld""" print "this is test1: %s" %test print "this is test2: %r" %test 输出: this is test1: hello, world this is test2: 'hello,\nworld' 由此可见,在
2015-04-30 11:07:16 345
转载 Python中split的用法
字符串的split用法 1.按某一个字符分割,如‘.’ ? 1 2 3 4 str = ('www.google.com') print str str_split = str.split('.') print str_split
2015-04-30 09:18:19 1433
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人