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);
Q. Give the algorithm to build a binary tree where the yields of preorder and post order traversal are given to us.
1. develop an algorithm which reads two decimal numbers x and y and determines and prints out wether x>y or y>x. the input values, x and y, are whole number > or equal to 0, which
what''s queue ?
Q.1 What is an algorithm? What are the characteristics of a good algorithm? Q.2 How do you find the complexity of an algorithm? What is the relation between the time and space c
Merge sort is a sorting algorithm which uses the basic idea of divide and conquers. This algorithm initially divides the array into two halves, sorts them separately and then merge
#question. merging 4 sorted files containing 50,10,25,15 records will take time?
Graph Traversal In many problems we wish to investigate all the vertices in a graph in some systematic order. In graph we often do not have any single vertex singled out as spe
Algorithm for insertion of any element into the circular queue: Step-1: If "rear" of the queue is pointing at the last position then go to step-2 or else Step-3 Step-2: make
/* The program accepts matrix like input & prints the 3-tuple representation of it*/ #include void main() { int a[5][5],rows,columns,i,j; printf("enter the order of
Define Strictly Binary Tree Strictly Binary Tree: - If each non leaf node in binary tree has non empty left and right sub-trees , then the tree is known as a strictly binary t
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