Skip to content

Reverse polish notation initial#103

Open
yuryver wants to merge 1 commit intodevelopfrom
Reverse-polish-notation
Open

Reverse polish notation initial#103
yuryver wants to merge 1 commit intodevelopfrom
Reverse-polish-notation

Conversation

@yuryver
Copy link
Contributor

@yuryver yuryver commented Aug 22, 2017

Your job is to create a calculator which evaluates expressions in Reverse Polish notation.

For example expression 5 1 2 + 4 * + 3 - (which is equivalent to 5 + ((1 + 2) * 4) - 3 in normal notation) should evaluate to 14.

Note that for simplicity you may assume that there are always spaces between numbers and operations, e.g. 1 3 + expression is valid, but 1 3+ isn't.

Empty expression should evaluate to 0.

Valid operations are +, -, *, /.

You may assume that there won't be exceptional situations (like stack underflow or division by zero).

@codecov-io
Copy link

codecov-io commented Aug 22, 2017

Codecov Report

Merging #103 into develop will decrease coverage by 0.39%.
The diff coverage is 92.68%.

Impacted file tree graph

@@             Coverage Diff              @@
##             develop     #103     +/-   ##
============================================
- Coverage      86.26%   85.87%   -0.4%     
- Complexity       355      411     +56     
============================================
  Files             84       93      +9     
  Lines            852      977    +125     
  Branches         140      165     +25     
============================================
+ Hits             735      839    +104     
- Misses           105      122     +17     
- Partials          12       16      +4
Impacted Files Coverage Δ Complexity Δ
.../main/java/org/fundacionjala/coding/yury/Calc.java 92.68% <92.68%> (ø) 25 <25> (?)
...ltiplesofthreeandfive/MultiplesOfThreeAndFive.java 66.66% <0%> (ø) 4% <0%> (?)
...ionjala/coding/marcoslara/spinwords/SpinWords.java 71.42% <0%> (ø) 3% <0%> (?)
.../coding/marcoslara/eanvalidation/EanValidator.java 66.66% <0%> (ø) 4% <0%> (?)
...arcoslara/averagesofnumbers/AveragesOfNumbers.java 75% <0%> (ø) 4% <0%> (?)
...g/marcoslara/evalulationevaporator/Evaporator.java 75% <0%> (ø) 2% <0%> (?)
.../marcoslara/highestandlowest/HighestAndLowest.java 50% <0%> (ø) 1% <0%> (?)
...ndacionjala/coding/marcoslara/bankocr/BankOCR.java 90% <0%> (ø) 9% <0%> (?)
.../marcoslara/sortinnercontent/SortInnerContent.java 83.33% <0%> (ø) 4% <0%> (?)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0ad9198...571f478. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants