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 many recursive calls are called by the naïve recursive algorithm for binomial coefficients, C(10, 5) and C(21, 12) C(n,k){c(n-1,k)+c(n-1,k-1) if 1 1 if k = n or k = 0
Write the algorithm for compound interest
Two broad classes of collision resolution techniques are A) open addressing and B) chaining
How will you represent a max-heap sequentially? Max heap, also known as the descending heap, of size n is an almost complete binary tree of n nodes such that the content of eve
Question 1 What is a data structure? Discuss briefly on types of data structures Question 2 Explain the insertion and deletion operation of linked list in detail Question
What is an Algorithm? An algorithm is a sequence of unambiguous instructions for solving a problem, i.e., for getting a needed output for any legitimate input in a finite amoun
The total of time needed by an algorithm to run to its completion is termed as time complexity. The asymptotic running time of an algorithm is given in terms of functions. Th
Explain how two dimensional arrays are represented in memory. Representation of two-dimensional arrays in memory:- Let grades be a 2-D array as grades [3][4]. The array will
A tree is a non-empty set one component of which is designated the root of the tree while the remaining components are partitioned into non-empty groups each of which is a subtree
explain the prims''s algorithm with suitable example?
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