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. Write down an algorithm to test whether a Binary Tree is a Binary Search Tree.
Ans.
The algorithm to check whether a Binary tree is as Binary Search tree is as
follows:
bstree(*tree)
{
while((tree->left !=null)&& (tree->right !=null))
if(tree->left < tree->root)
bstree(tree->left);
else return(1);
if(tree->right > tree->root)
bstree(tree->right);
}
return(0);
how we can convert a graph into tree
There are ten stations on a railway line: Train travels in both directions (i.e. from 1 to 10 and then from 10 to 1). Fare between each station is $2. A passenger input
Thus far, we have seen the demonstration of a single queue, but several practical applications in computer science needs several queues. Multi queue is data structure in which mult
Records are mapped onto a computer store by simply juxtaposing their elements. The address of a component (field) r relative to the origin address of the record r is named the fiel
RGB Model The RGB model is based on the assumption that any desired shade of colour can be obtained by mixing the correct amounts of red, green, and blue light. The exact hues
Define Spanning Tree A Spanning Tree of a connected graph is its linked acyclic sub graph (i.e., a tree) that having all the vertices of the graph.
Merge sort: Merge sort is a sorting algorithm that uses the idea of split and conquers. This algorithm splits the array into two halves, sorts them separately and then merges t
Using the cohen sutherland. Algorithm. Find the visible portion of the line P(40,80) Q(120,30) inside the window is defined as ABCD A(20,20),B(60,20),C(60,40)and D(20,40)
We have discussed already about three tree traversal methods in the earlier section on general tree. The similar three different ways to do the traversal -inorder , preorder, and p
Deletion Algorithm for dequeue Step 1: [check for underflow] If front = 0 and rear = 0 Output "underflow" and return Step 2: [delete element at front end] If front
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