Answered step by step
Verified Expert Solution
Question
1 Approved Answer
CODE in C++ where need. correct answer will reward with 5 thumbs up Q. No. 02: 20) Give brief answers to the following questions. (Points:
CODE in C++ where need.
correct answer will reward with 5 thumbs up
Q. No. 02: 20) Give brief answers to the following questions. (Points: 1. In AVL trees, which are self-balancing, we require rotations to maintain the balance factor of each node. 4 types of rotations are implemented based on the nature of problem a node face. Explain each of the scenarios (no code required; you can use pictures to show rotations) (4 marks) 2. What is the advantage of using the linked list-based implementation of data-structures, as opposed to the array-based implementation? (3 marks) 3. Consider a BST that stores integer type values. Write a function, sumAinMax. that calculates the sum of smallest and largest value present in the tree and prints the value. For the following tree, the function should output 12 (ie 3 +9). (5 marks) 4. Write a function "ReversePrint" that prints the data of doubly linked list in reverse order. (3 marks) 5. Consider the given binary tree and answer the question below. (5 marks) 1 a. What is the result of post order traversal of the above tree? b. What is the result of in-order traversal of the above tree? Is the above binary tree a Binary Search Tree? Why or Why not? C
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started