MCQ Bank
What is a skip list?
- A) a linked-list that allows faster search within an ordered sequence
- B) a linked-list with size value in nodes
- C) a tree which is in the form of linked list
- D) a linked-list that allows slower search within an ordered sequence
A pair of sets which does not have any ________ element are called disjoint sets
- A) Different
- B) Common
- C) Null
- D) Uncommon
In min heap, if there are 100 elements in a heap and we perform 100 deleteMin operations then we will get the elements in _________.
- A) Descending order
- B) Random
- C) Unsorted
- D) Ascending order
If we want to find 3rd minimum element from an array of elements, then after applying buildHeap method, how many times deleteMin method will be called ?
- A) 4
- B) 1
- C) 3
- D) 2
The scenario “If Ali is brother of Asif and Asif is brother of Uzma then Ali is brother of Uzma” is the example of ___________ property.
- A) Transitive
- B) Reflexive
- C) Identity
- D) Symmetry
Which of the following possible operations are performed on Table ADT?
- A) Only Insert and Remove
- B) Insert, Find, Remove
- C) Only Insert and Find
- D) Only Find and Remove
Given the values are the array representation of heap;
12 23 26 31 34 44 56 64 78 100
What is the 5th smallest element in the given heap?
- A) 31
- B) 56
- C) 34
- D) 44
For a perfect binary tree of height h, having N nodes, the sum of heights of nodes is _____________.
- A) N – 1 + h
- B) N – (h - 1)
- C) N – 1
- D) N – h – 1
Given the values are the array representation of heap;
12 23 26 31 34 44 56 64 78 100
If we perform 4 deleteMin operations, the last element deleted is__________.
- A) 31
- B) 44
- C) 34
- D) 56
If a tree has 50 nodes, then the total edges/links in the tree will be :
- A) 50
- B) 55
- C) 51
- D) 49
For a perfect binary tree of height 4. What will be the sum of heights of nodes?
- A) 31
- B) 27
- C) 30
- D) 26
The array in binary search is sub divided ______________.
- A) Once
- B) Until a sublist is no more divisible
- C) Twice
- D) N time
The expression
if ( ! heap->isFull() )
check
- A) Heap is empty
- B) Heap is full
- C) Heap is not empty
- D) Heap is not full
The total number of nodes on 5th level of a perfect binary tree are :
- A) 15
- B) 16
- C) 31
- D) 32
Suppose there are a set of fruits and a set of vegetables. Both sets are ______________ sets.
- A) Disjoint
- B) Subsets
- C) Whole
- D) Equal
Which of the following properties are satisfied by Equivalence relationship?
- A) Only Reflexive and Transitive
- B) Only Symmetric and transitive
- C) Reflexive , Symmetric and Transitive
- D) Only Reflexive and Symmetric
Which one of the following is NOT the property of equivalence relation?
- A) Symmetric
- B) Reflexive
- C) Associative
- D) Transitive
A perfect binary tree is constructed using 127 nodes then what will be sum of heights of nodes?
- A) 121
- B) 119
- C) 118
- D) 120
If a tree has 20 edges/links, then the total number of nodes in the tree will be :
- A) Can't be determined
- B) 19
- C) 20
- D) 21
Heap can be used to implement
- A) Stack
- B) Queue
- C) Linked list
- D) Priority Queue