package
0.0.0-20241221191246-b80a13d7bbe0
Repository: https://github.com/yvv4git/go-algorithms.git
Documentation: pkg.go.dev
# README
227. Basic Calculator II
Level - medium
Task
Given a string s which represents an expression, evaluate this expression and return its value.
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 [-2^31, 2^31 - 1].
Note: You are not allowed to use any built-in function which evaluates strings as mathematical expressions, such as eval().
Объяснение
Цель задачи - написать функцию, которая вычисляет арифметическое выражение, представленное в виде строки, используя стандартные правила приоритета операторов.