Give time to compute the three operations: insertion, successful search and unsu
ID: 3650168 • Letter: G
Question
Give time to compute the three operations: insertion, successful search and unsuccessful search with the following data structures:a linked list of elements non-tries,
a red-and-black tree,
a hash table with linear probing (filling factor <3 = 4 ),
a 2-3-4 tree ,
a hash table with addressing open (double hashing), the filling factor? <0:75 .
Specify the calculation time asymptotic notation as a function of the number n of elements in three cases: the worst case, best case and average
Explanation / Answer
Insertion code: void main() { root = new tree; cin>>root->data; root->left=NULL; root->right=NULL; for(int i=1; i>temp1->data; temp1->left = NULL; temp1->right= NULL; temp2 = root; if(temp1->data>root->data) { right_tree(); } else { left_tree(); } } getch(); } successful search code: #include #include #include using namespace std; void main() { int a[5]={5,9,1,3,6}; int find,b=0; for(int j=0;jRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.