Use app×
Join Bloom Tuition
One on One Online Tuition
JEE MAIN 2025 Foundation Course
NEET 2025 Foundation Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
0 votes
114 views
in Computer by (68.9k points)
closed by

Consider the following New-order strategy for traversing a binary tree: 

• Visit the root; 

• Visit the right subtree using New-order; 

• Visit the left subtree using New-order; 

The New-order traversal of the expression tree corresponding to the reverse polish expression 3 4 * 5 - 2 ˆ 6 7 * 1 + - is given by: 

(A) + - 1 6 7 * 2 ˆ 5 - 3 4 * 

(B) - + 1 * 6 7 ˆ 2 - 5 * 3 4 

(C) - + 1 * 7 6 ˆ 2 - 5 * 4 3 

(D) 1 7 6 * + 2 5 4 3 * - ˆ -

1 Answer

+1 vote
by (67.8k points)
selected by
 
Best answer

(C) - + 1 * 7 6 ˆ 2 - 5 * 4 3 

Given is the post fix expression the expression tree given below.

New-order of above expression tree is

− + ∧ − 1* 76∧2 - 5* 43

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

Categories

...