A message containing letters from A-Z is being encoded to numbers using the following mapping:'A' -> 1'B' -> 2...'Z' -> 26Given an encoded message con...
分类:
其他好文 时间:
2014-07-06 14:42:59
阅读次数:
150
10.mime-mapping:mime-mapping包括两个子元素extension和mime-type.定义某一个扩展名和某一MIME Type做对映.MIME(Multipurpose Internet Mail Extensions)多用途互联网邮件扩展类型就是设定某种扩展名的文件用一种应...
分类:
移动开发 时间:
2014-07-06 14:38:57
阅读次数:
175
Export aborted because fatal lint errors were found.These are listed in the Problems view.Either fix these before running Export again,or turn off "Ru...
分类:
移动开发 时间:
2014-07-06 14:23:18
阅读次数:
363
逆波兰式的求解,建立一个类栈容器,遍历给定的逆波兰表达式,遇到数字就push, 遇到操作符就进行出栈,连续出两次,因为给定的四则运算符都是双目的,这里注意下这两个操作数的先后顺序,因为对于加法和乘法没关系,但是对于减法和除法是有先后关系的。然后进行相应的运算,将结果push进栈中。
这里附带说明下python中进行除法运算与c,java系列中的除法的不同,就是向下取整的问题。这种不同表现在两个操...
分类:
编程语言 时间:
2014-07-06 12:22:02
阅读次数:
235
可以练习下链表的逆置。
def PrintListReversingly(head):
if head == None:
return
if head:
PrintListReversingly(head.next)
print head.val
def reverse(head):
if head == None or head.next == None:
return...
分类:
其他好文 时间:
2014-07-06 09:29:57
阅读次数:
214
陆陆续续几个月下来,终于把题刷完了,过程中遇到的python的题解很少,这里重新用python实现下,所以题解可能都是总结性的,或者是新的心得,不会仅针对题目本身说的太详细。
def reverseWords(self, s):
s = ' '.join(s.split()[::-1])
return s
[ : : -1 ] 是将元素进行翻转...
分类:
编程语言 时间:
2014-07-06 00:37:50
阅读次数:
299
表达式: ["2", "1", "+", "3", "*"] -> ((2 + 1) * 3) -> 9 ["4", "13", "5", "/", "+"] -> (4 + (13 / 5)) -> 6
题目大意:给定一个逆波兰表达式,求该表达式的值
思路:由于逆波兰表达式本身不需要括号来限制哪个运算该先进行,因此可以直接利用栈来模拟计算:遇到操作数直接压栈,碰到操作符直接取栈顶的2...
分类:
编程语言 时间:
2014-07-06 00:07:22
阅读次数:
296
A message containing letters from A-Z is being encoded to numbers using the following mapping:
'A' -> 1
'B' -> 2
...
'Z' -> 26
Given an encoded message containing digits, determine the total numb...
分类:
其他好文 时间:
2014-07-05 23:41:41
阅读次数:
253
Given a linked list, reverse the nodes of a linked listkat a time and return its modified list.If the number of nodes is not a multiple ofkthen left-o...
分类:
其他好文 时间:
2014-07-03 23:51:47
阅读次数:
408
[LeetCode]Reverse Integer...
分类:
其他好文 时间:
2014-07-03 16:36:33
阅读次数:
121