/Calculator

Calculator usind parenthesis-free notation

Primary LanguagePythonBSD 2-Clause "Simplified" LicenseBSD-2-Clause

Calculator

Test task for creating a dequeue and a calculator.

Calculator usind postfix notation.

Accepts a string with data and performs calculations according to the rules of Reverse Polish notation.

Example:

  • input >>> 4 13 5 / +
  • 13 // 5 + 4
  • output >>> 6

What is Reverse Polish notation: https://en.wikipedia.org/wiki/Reverse_Polish_notation

Deck

Bidirectional queue, with the ability to add and remove items at the beginning and end of the queue.