/calc

Coding Test for Ardoq.

Primary LanguageJavaScript

Hosted here: http://peaceful-ocean-71245.herokuapp.com/

First task

The first task is stored as python/highest_product_of_3.py.

Assumption made: All arrays passed are valid (len >= 3, numbers only).

Note: Implementing this in linear time is fairly straightforward, but I figured doing it with a sort would be more legible.

Second task

The rest of the repo is the second task. The backend code was written in scala (using akka-http and circe), and is stored under src/main.

The backend just uses a stock parser combinator for parsing and evaluating the expressions, so I also wrote a Shunting-Yard parser in python (python/infix_to_postfix.py).

The frontend code was written in react (using create-react-app) and is stored under frontend.