Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I was required to improve range Search function in BST's Big-O by adding additional information to tree nodes. that improvement increases Big-O to O(h), h

I was required to improve range Search function in BST's Big-O by adding additional information to tree nodes.

that improvement increases Big-O to O(h), h is height and

additional information should be added and subtracted by inserting and deleting nodes.

therefore, We needs to modify BST's insert and delete algorithm.

under, there are rangeSearch,Insert,Delete function's declaration and function description.

range search function is

int rangeSearch(Tree T,int a,int b)

that counts the number between a to b in tree.

Insert function is

Node insert(Node n,Element e)

that inserts Element e in Node n.

Delete function is

Node Delete(Node n,Element e)

that deletes Node n which has element e.

finally, I really hope to be given answer is what should be added in tree node.

and if you give me the answer through C programming, I am really glad !!

please give me clear answer !!

and if you need more information, please let me know what information you want.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Transport Operations

Authors: Allen Stuart

2nd Edition

978-0470115398, 0470115394

Students also viewed these Programming questions

Question

=+ what are their probable future moves?

Answered: 1 week ago