Evaluation of Arithmetic Expression Tree

Problem Given a simple expression tree, consisting of basic binary operators i.e., + , – , * and / and some integers, evaluate the expression tree. Examples Example 1: graph TD; A(+) --- B(*) & C("-") B --- D(5) & E(4) C --- F(100) & G(20) Input: root = ["+", "*", "-", "5", "4", "100", "20"] Output: 100 ...

This site uses cookies to improve your experience on our website. By using and continuing to navigate this website, you accept this. Privacy Policy