摘要:
Given an unsorted integer array, find the first missing positive integer.For example,Given[1,2,0]return3,and[3,4,-1,1]return2.Your algorithm should run inO(n) time and uses constant space. 1 public class Solution{ 2 public int firstMissingPositive(int[] A){ 3 int result = 1; //if the... 阅读全文
posted @ 2014-01-30 08:16
Averill Zheng
阅读(146)
评论(0)
推荐(0)
摘要:
Evaluate the value of an arithmetic expression inReverse 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&qu 阅读全文
posted @ 2014-01-30 06:57
Averill Zheng
阅读(121)
评论(0)
推荐(0)

浙公网安备 33010602011771号