/algorithms

Various algorithms solved for fun

Primary LanguageTypeScript

Simple calculator

Given a simple multiplication/addition mathimatical expression as a string like the following examples

  13 -> 13
  ( + 1 5 ) -> 6
  ( + 3 4 9 ) -> 16
  ( + ( + 6 8 ) ( * 3 7 1 ) 5 )-> 40

Return the result of that expression