2013年11月28日

Decode Ways

摘要: A message containing letters fromA-Zis being encoded to numbers using the following mapping:'A' -> 1'B' -> 2...'Z' -> 26Given an encoded message containing digits, determine the total number of ways to decode it.For example,Given encoded message"12", it cou 阅读全文

posted @ 2013-11-28 11:36 waruzhi 阅读(188) 评论(0) 推荐(0) 编辑

Evaluate Reverse Polish Notation

摘要: 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 @ 2013-11-28 09:15 waruzhi 阅读(235) 评论(0) 推荐(0) 编辑

导航