The gray code is a binary numeral system where
two successive values differ in only one bit.Given a non-negative
integernrepresenting the total number...
分类:
其他好文 时间:
2014-06-10 00:01:38
阅读次数:
392
freemarker自定义标签
1、错误描述
freemarker.core.ParseException: Encountered " " at line 14, column 12 in myself.ftl.
Was expecting one of:
...
...
"false" ...
"true" ...
...
....
分类:
其他好文 时间:
2014-06-09 23:38:56
阅读次数:
355
下面说说split函数的用法
def break_words(stuff):
"""This function will break up words for us."""
words = stuff.split(' ')#split('.',1) use '.' split one time
return words
def sort_words(wo...
分类:
编程语言 时间:
2014-06-08 18:19:21
阅读次数:
336
Find the contiguous subarray within an array (containing at least one number) which has the largest sum....
分类:
其他好文 时间:
2014-06-08 15:54:08
阅读次数:
258
【题目】
Say you have an array for which the ith element is the price of a given stock on day i.
If you were only permitted to complete at most one transaction (ie, buy one and sell one share of the stock), design an algorithm to find the maximum profit.
...
分类:
其他好文 时间:
2014-06-08 15:11:58
阅读次数:
298
一、自定义视图类继承View或者View的子类
All of the view classes defined in the Android framework extend View.
Your custom view can also extend Viewdirectly,
or you can save time by extending one of the exist...
分类:
移动开发 时间:
2014-06-08 10:11:27
阅读次数:
342
Definition
Let be "0" and
be "01". Now (the concatenation of the previous sequence and the one before that).
The infinite Fibonacci word is the limit
We have:
0
01
010
01...
分类:
其他好文 时间:
2014-06-08 09:19:42
阅读次数:
273
题目
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 greater or equal to m + n) to hold additional el...
分类:
其他好文 时间:
2014-06-08 05:05:47
阅读次数:
268
Single NumberGiven an array of integers, every
element appearstwiceexcept for one. Find that single one.Note:Your algorithm
should have a linear runti...
分类:
其他好文 时间:
2014-06-07 23:44:39
阅读次数:
302
Given a non-negative number represented as an
array of digits, plus one to the number.The digits are stored such that the most
significant digit is at...
分类:
其他好文 时间:
2014-06-07 16:56:28
阅读次数:
188