归档 2014

[Leetcode]Evaluate Reverse Polish Notation

题目描述

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 ...

继续阅读

[Leetcode]Reverse Words in a String

题目描述

Given an input string, reverse the string word by word.

For example,
Given s = "the sky is blue",
return "blue is sky the".

Clarification:

What constitutes a word?
A sequence of non-space characters constitutes a word.

Could the input ...

继续阅读

[LeetCode]Maximum Product Subarray

题目描述:

Find the contiguous subarray within an array (containing at least one number) which has the largest product.

For example, given the array [2,3,-2,4],
the contiguous subarray [2,3] has the largest product = 6.

题目大意:

从数组(至少包含一个数字 ...

继续阅读

Python脚本如何生成Windows可执行文件.exe

Python是一种简单而强大的编程语言,适用于编写脚本,甚至于应用程序的开发。Python可用的各种GUI包使得利用Python编写全功能的应用变为可能。这很好,但你有没有想过将你编写的Python脚本转化为可执行文件?这似乎是一个很赞的主意,有许多原因!你可以在没有Python解释器的情况下重新部署你的应用。终端用户不需要在他的机器上安装Python。你可以将你的应用闭源(很不幸)等等……这篇文章可以告诉你如何从你的Python脚本生成win32可执行文件。 

Python is a simple and powerful language for scripting and even application development. Various GUI packages available for Python makes it suitable for developing full fledged ...

继续阅读

每月存档

明年