# LeetCode 第772题 Basic Calculator III 简要分析及Python代码

Title: LeetCode Problem 772. Basic Calculator III 简要分析及Python代码

Date: 2018-01-24

Category: Programming

Tags: LeetCode, Python, Programming, Solution, Hard, Algorithm

Slug: leetcode-765

Author: ouankou

LeetCode 第772题 Basic Calculator III 简要分析及Python代码

Implement a basic calculator to evaluate a simple expression string.

The expression string may contain open and closing parentheses , the plus or minus sign , non-negative integers and empty spaces.

The expression string contains only non-negative integers, , , , operators open and closing parentheses and empty spaces. The integer division should truncate toward zero.

You may assume that the given expression is always valid. All intermediate results will be in the range of .

Examples:

Note:

Do not use the built-in library function.

Hard.

• 发表于:
• 原文链接：http://kuaibao.qq.com/s/20180126G03SZC00?refer=cp_1026
• 腾讯「云+社区」是腾讯内容开放平台帐号（企鹅号）传播渠道之一，根据《腾讯内容开放平台服务协议》转载发布内容。

2019-03-25

2018-07-02

2018-06-29

2018-04-24

2019-03-25

2019-03-25

2019-03-25