1.单链表反转
2.逆波兰式 -->后缀表达式
Evaluate the value of an arithmetic expression in Reverse Polish Notation.
Valid operators are +, -, *, /. Each operand may be an integer or another expression.
Some examples:
["2", "1", "+", "3", "*"] -> ((2 + 1) * 3) -> 9
["4", "13", "5", "/", "+"] -> (4 + (13 / 5)) -> 6
参考:http://www.jianshu.com/p/48a01fa36805
3. 给出a个1、b个2、c个3、d个4,要求找到其中的所有等差数列,等差数列必须不小于3,且没有剩余。
例如:输入的abcd四个值为
[1,2,2,1]时,则能组成等差数列[1,2,3]和[2,3,4],且没有数字剩余
[1,0,0,0]时,则只有数字1,不能组成等差数列
[0,0,0,1]时,则可组成一个等差数列[1,1,1,1]
要求写出代码
4. 写出一个线程安全的单例模式。除了单例模式,介绍一下熟悉的其他模式。
5.