Redirected
retagged by
1,547 views
1 votes
1 votes

Which of the following need not be a binary tree?

  1. Search tree
  2. Heap
  3. AVL tree
  4. B tree
retagged by

5 Answers

4 votes
4 votes

Will be both Heap and B tree.

Heaps
Definition: A heap is a specialized tree-based data structure that satisfied the heap property:
  • if B is a child node of A, then key(A) ≥ key(B). This implies that an element with the greatest key is always in the root node, and so such a heap is sometimes called a max-heap. Of course, there's also a min-heap.

Variants:

  • 2-3 heap
  • Binary Heap
  • Many many others

Binary heap storage rules  -- A heap implemented with a binary tree in which the following two rules are followed:

  • The element contained by each node is greater than or equal to the elements of that node's children.
  • The tree is a complete binary tree.

So heap needn't be binary always.

AVL tree is BST with balancing factor.

Source: https://www.cpp.edu/~ftang/courses/CS241/notes/heap.htm

1 votes
1 votes
B tree...................... B trees need not be the binary tree. B trees may have more than 2 children....

order of B tree is max. no. of children a node can have..
1 votes
1 votes
Search Tree => Can be Binary or n ary (Even B+ tree, AVL Tree are search tree only)

Heap => Can be binary as well as n ary

AVL Tree => Also a search tree, usually its binary. (didn't get any reference saying otherwise)

B Tree => Not necessarily a binary tree.

So A,B,D need not be a binary tree.

But in exam one can select D, as that maybe most appropriate "as per examiner".
0 votes
0 votes
B-Tree is the answer as it can bee m-ary .

heap is almost complete binary tree and AVL tree is height balanced binary tree.
Answer:

Related questions

1 votes
1 votes
3 answers
1
admin asked Mar 31, 2020
1,052 views
The maximum number of nodes in a binary tree of level $k, k\geq1$ is:$2^k+1$$2^{k-1}$$2^k-1$$2^{k-1}-1$
1 votes
1 votes
2 answers
3
admin asked Mar 31, 2020
3,858 views
Process of analyzing relation schemas to achieve minimal redundancy and insertion or update anomalies is classified as:normalization of data.denomination of data.isolatio...
2 votes
2 votes
3 answers
4
admin asked Mar 31, 2020
744 views
If $L1$ is CFL and $L2$ is regular language which of the following is false?$L1-L2$ is not Context free$L1$ intersection $L2$ is Context free$\sim L1$ is Context freeBoth...