answersLogoWhite

0


Best Answer

yes

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: In a binary search tree the key in the node is larger than every key in the left sub-tree and smaller than every key in the right sub-tree?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is binary search in data structure using c?

a tree which has atmost two nodes is called binary tree binary search tree is a binary tree which satisfies the following 1.every node in tree must be distinct 2.values in right subtree > value at root 3.values in left subtree < value at root 4.left,right subtrees must be binary search trees


How to find height of subtree in a Binary tree?

Check this out! http://stackoverflow.com/questions/575772/the-best-way-to-calculate-the-height-in-a-binary-search-tree-balancing-an-avl


What is a multiway serach tree?

Multiway search tree of degree n. A generalization of a binary search tree to a tree of degree n where each node in the ordered tree has m ← n children and contains (m-1) ordered key values, called subkeys. For some given search key, if the key is less than the first subkey then the first subtree (if it exists) is searched for the key; if the key lies between the i th and (i + 1)th subkey, wherei = 1,2,…, m-2then the (i + 1)th subtree (if it exists) is searched; if the key is greater than the last subkey then the m th subtree (if it exists) is searched.


What is the difference between avl tree and binary tree?

A binary tree is a tree data structure in which each node has at most two children. Typically the child nodes are called left and right. One common use of binary trees is binary search trees; another is binary heaps. A binary search tree (BST) is a binary tree data structure which has the following properties: ->each node has a value; ->a total order is defined on these values; ->the left subtree of a node contains only values less than the node's value; ->the right subtree of a node contains only values greater than or equal to the node's value. An AVL tree is a self-balancing binary search tree. In an AVL tree the heights of the two child subtrees of any node differ by at most one, therefore it is also called height-balanced. Lookup, insertion, and deletion all take O(log n) time in both the average and worst cases. Additions and deletions may require the tree to be rebalanced by one or more tree rotations.


What assumption about the list is made when binary search is conducted?

Binary search requires that the list be in search key order.


What is the difference between extended binary tree and a binary search tree?

A strictly binary tree is one where every node other than the leaves has exactly 2 child nodes. Such trees are also known as 2-trees or full binary trees. An extended binary tree is a tree that has been transformed into a full binary tree. This transformation is achieved by inserting special "external" nodes such that every "internal" node has exactly two children.


What is the use of binary?

Binary trees are commonly used to implement binary search tree and binary heaps.


A binary search of an orderd set of elements in an array or a sequential search of the elements.Which one is faster?

A binary search is much faster.


What is the binary number for decimal 191?

It is 10111111 in binary. Try a search for '191 to binary'.


Items that are not suitable for a binary search?

The only items suitable for a binary search are those which are in a sorted order.


Does binary tree and binary search tree same?

no they are not same


Write an algorithm with analysis steps for binary search?

Given a sorted data sequence, if the data sequence is empty, return NULL to indicate the value does not exist, otherwise compare the middle element's value with the value being searched. If there's a match, return a reference to that element. If there is no match and the value being searched is smaller, repeat the search upon the lower half of the sequence, otherwise repeat the search on the upper half of the sequence. The data sequence must be in sorted order. With each unsuccessful iteration of the algorithm, the order allows us to eliminate half of the remaining elements. Typically, the data sequence will be implemented as an array (or vector) as this allows constant-time random-access to the middle element of the sequence. A binary tree can also be used but, for efficiency, the tree must be balanced. That is, for any subtree within the tree, there must be the same number of nodes under both the left and right branches or no more than 1 node difference. With a balanced binary tree, every node is the middle element of its subtree. Thus, for every unsuccessful iteration, we simply traverse left or right, starting at the root. The best case time complexity for binary search of n elements is O(1), where the element is found in the first iteration (and is therefore the middle element). The worst case is O(log n) - the binary logarithm of n.