/BSCS1DSAPROJECT

Our First Project Collaboration in School

Primary LanguageJava

1st Year Project in Data Structure and Algorithms 2023

Problem: Write a program that takes, as input, a fully parenthesized, arithmetic expression and converts it to a binary expression tree. Your program should display the tree in some way and also print the value associated with the root. For an additional challenge, allow for the leaves to store variables of the form x1, x2, x3, and so on, which are initially 0 and which can be updated interactively by your program, with the corresponding update in the printed value of the root of the expression tree. Display the corresponding prefix and postfix notation.