(A) A binary tree of N external nodes has N internal node
(B) A binary tree of N internal nodes has N+ 1 external node
(C) A binary tree of N external nodes has N+ 1 internal node
(D) A binary tree of N internal nodes has N- 1 external node
Tag: Data Structures and Algorithms Mcq
simple sorting algorithm like selection sort or bubble sort has a worst-case of?
(A) O(1) time because all lists take the same amount of time to sort
(B) O(n) time because it has to perform n swaps to order the list
(C) O(n2) time because sorting 1 element takes O(n) time – After 1 pass through the list, either of these algorithms can guarantee that 1 element is sorted
(D) O(n3) time, because the worst case has really random input which takes longer to sort
Which one of the following is NOT true regarding the skip list?
(A) Each list Si contains the special keys + infinity and – infinity
(B) List S0 contains the keys of S in non-decreasing order
(C) Each list is a subsequence of the previous one
(D) List Sh contains only the n special keys
Binary Search is an algorithm of searching, used with the ___ data.
(A) Sorted
(B) Unsorted
(C) Heterogeneous
(D) Random
If there are 23 external nodes in a binary tree then what will be the no. of internal nodes in this binary tree?
(A) 21
(B) 22
(C) 23
(D) 24
If there are 56 internal nodes in a binary tree then how many external nodes this binary tree will have?
(A) 54
(B) 55
(C) 56
(D) 57
Every AVL is?
(A) Binary Tree
(B) Complete Binary Tree
(C) Binary Search Tree
(D) None of the above
Compiler uses which one of the following in Function calls?
(A) Stack
(B) Queue
(C) Binary search tree
(D) AVL tree