For this project, you are given the parenthesized expressions as an input and you are first expected to build the generalized list (GL) data structure for these expressions given one by one. Once the GL is built, you are going to perform some queries on this structure. The boilerplate with the class definition is given to you. You are not allowed to change the class fields. All the queries given are supposed to be performed in the GL object structure that is given to you. All traversals for the queries must be performed in the GL structure itself. Query options are explained below.
Example for each is given in the next section.
• D – display the expressions one by one.
• F – find the char variable in the given expression. Return true or false.
• L – Least Common Ancestor (LCA) is the lowest node that has both given char variables as descendants. Here we find the longest path to the least common ancestor from either of the char variable nodes. For example: In expression 0 the LCA of a and c is 1. In expression 3, the LCA of f and d is 2. o Implementation of LCA is extra credit (20%). Announcement about how to go about submitting will be made soon.
• H – find the height of the given expression. • U – find and display the different duplicates in the given expression. If no duplicates, print “No duplicates”.
DescriptionIn this final assignment, the students will demonstrate their ability to apply two ma
Path finding involves finding a path from A to B. Typically we want the path to have certain properties,such as being the shortest or to avoid going t
Develop a program to emulate a purchase transaction at a retail store. Thisprogram will have two classes, a LineItem class and a Transaction class. Th
1 Project 1 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of
1 Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of