摘要:
Evaluate the value of an arithmetic expression inReverse Polish Notation.Valid operators are+,-,*,/. Each operand may be an integer or another express... 阅读全文
posted @ 2014-05-21 23:48
Sara Chi
阅读(126)
评论(0)
推荐(0)
摘要:
Given a binary tree, return theinordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3return[1,3,2].Note... 阅读全文
posted @ 2014-05-21 23:18
Sara Chi
阅读(113)
评论(0)
推荐(0)
摘要:
Say you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm to find the maximum profit. You may complete a... 阅读全文
posted @ 2014-05-21 23:07
Sara Chi
阅读(88)
评论(0)
推荐(0)
摘要:
Givenn, how many structurally uniqueBST's(binary search trees) that store values 1...n?For example,Givenn= 3, there are a total of 5 unique BST's. 1... 阅读全文
posted @ 2014-05-21 23:02
Sara Chi
阅读(110)
评论(0)
推荐(0)
摘要:
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 ... 阅读全文
posted @ 2014-05-21 22:58
Sara Chi
阅读(255)
评论(0)
推荐(0)
摘要:
Given two binary trees, write a function to check if they are equal or not.Two binary trees are considered equal if they are structurally identical an... 阅读全文
posted @ 2014-05-21 22:52
Sara Chi
阅读(126)
评论(0)
推荐(0)
摘要:
Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest le... 阅读全文
posted @ 2014-05-21 22:47
Sara Chi
阅读(97)
评论(0)
推荐(0)
摘要:
Given an array of integers, every element appearstwiceexcept for one. Find that single one.Note:Your algorithm should have a linear runtime complexity... 阅读全文
posted @ 2014-05-21 22:40
Sara Chi
阅读(132)
评论(0)
推荐(0)
摘要:
Given an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "blue is sky the". 1 Class Solution{ 2 public: ... 阅读全文
posted @ 2014-05-21 21:10
Sara Chi
阅读(158)
评论(0)
推荐(0)
只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2014-05-21 20:41
Sara Chi
阅读(12)
评论(0)
推荐(0)

浙公网安备 33010602011771号