Already have an account? Get multiple benefits of using own account!
Login in your account..!
Remember me
Don't have an account? Create your account in less than a minutes,
Forgot password? how can I recover my password now!
Enter right registered email to receive password!
Q. Let a binary tree 'T' be in memory. Write a procedure to delete all terminal nodes of the tree.
Ans.
function to Delete Terminal Nodes from Binary Tree
void deleteleaves(struct node* root,struct node* prev)
{
if(root)
if(root->left==NULL&&root->right==NULL)
if(prev->item>=root->item)
prev->left=NULL;
else
prev->right=NULL;
printf("\n\n %d Is Being Deleted ...",root->item);
free(root);
return;
}
deleteleaves(root->left,root);
deleteleaves(root->right,root);
the call to this function will deleteleaves (root, root).
sir how can i explain deletion process in a data structure
whats the definition of ADT and data type?
What do you mean by hash clash? Hashing is not perfect. Occasionally, a collision occurs when two different keys hash into the same hash value and are assigned to the same arra
Q. Perform implementation of a queue using a singly linked list L. The operations INSER and DELETE should take O (1) time.
Multilist Representation of graph
loops
Question 1 What do you mean by Amortization? Question 2 Explain the following Big Oh notation (O) Omega notation (Ω) Theta notation (Θ) Question 3 Di
Consider a linked list of n elements. What is the time taken to insert an element after an element pointed by some pointer? O (1)
Difference between array and abstract data types Arrays aren't abstract data types since their arrangement in the physical memory of a computer is an essential feature of their
write aprogram for random -search to implement if a[i]=x;then terminate other wise continue the search by picking new randon inex into a
Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!
whatsapp: +91-977-207-8620
Phone: +91-977-207-8620
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd