题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1062解题报告:注意一行的末尾可能是空格,还有记得getchar()吃回车符。 1 #include 2 #include 3 #include 4 #include 5 #include 6 #incl...
分类:
其他好文 时间:
2014-07-27 10:12:02
阅读次数:
149
Reverse Words in a String考虑几个特殊的情况1.若字符窜s=" "2.字符窜s=“a b d e”3.字符窜s=“ a”class Solution {public: void reverseWords(string &s) { int i; int c...
分类:
其他好文 时间:
2014-07-26 17:03:01
阅读次数:
360
[cpp] view plaincopytemplatevoidreverse(BidirectionalIteratorfirst,BidirectionalIteratorlast);[cpp] view plaincopy如果不是改变原来的容器,而是翻转之后放在新容器里面,直接用reverse...
分类:
编程语言 时间:
2014-07-26 16:59:21
阅读次数:
394
今天用python自带的sorted对一个列表进行排序, 在这里总结一下只要是可迭代对象都可以用sorted 。sorted(itrearble, cmp=None, key=None, reverse=False)=号后面是默认值 默认是升序排序的, 如果想让结果降序排列,用reverse=Tru...
分类:
编程语言 时间:
2014-07-26 14:49:40
阅读次数:
284
题目:Evaluate the value of an arithmetic expression in Reverse Polish Notation.Valid operators are +, -, *, /. Each operand may be an integer or anothe....
分类:
编程语言 时间:
2014-07-26 14:14:35
阅读次数:
225
Reverse digits of an integer.Example1:x = 123, return 321Example2:x = -123, return -321 1 class Solution { 2 public: 3 int reverse(int x){ 4 ...
分类:
其他好文 时间:
2014-07-26 13:54:24
阅读次数:
206
TCPIP网络协议层对应的RFC文档RFC - Request For Comments请求注解TCP/IP层网络协议RFC文档Physical LayerData Link LayerARP-Address Resolution ProtocolRFC826(ENCN)RARP-Reverse A...
分类:
其他好文 时间:
2014-07-26 00:53:56
阅读次数:
423
描述:计算逆波兰表达法的结果Sample: ["2", "1", "+", "3", "*"] -> ((2 + 1) * 3) -> 9 ["4", "13", "5", "/", "+"] -> (4 + (13 / 5)) -> 6使用stack实现: 1 def is_op(c): 2 .....
分类:
其他好文 时间:
2014-07-26 00:13:26
阅读次数:
265
自动生成DO,手写DAO:Myeclipse添加Hibernate支持:注意别勾abstract生成DO:进入MyEclipse的Database Explorer右键要操作的表(注意一定要有主键)点击Hibernate Reverse,其中Id选择native。手写DAO:Configuratio...
分类:
系统相关 时间:
2014-07-25 03:36:14
阅读次数:
305
题目:You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a sin....
分类:
编程语言 时间:
2014-07-24 10:01:23
阅读次数:
223