Skip to content

Latest commit

 

History

History
11 lines (9 loc) · 342 Bytes

README.md

File metadata and controls

11 lines (9 loc) · 342 Bytes

Arithmetic-Tree

Calculates the result of an arithmetic tree with addition and multiplication, including for more than two child nodes Takes input as a comma separated predecessor list, and another comma separated list of the node’s value (for leaves) or operator (for non-leaves). e.g.

Input: -1,0,0,0,1,1,1 +,*,7,23,19,0,6

Output: 30