More Classes
5th Class
6th Class
7th Class
8th Class
9th Class
10th Class
11th Class
12th Class
NAT I
NAT II
CSS
IQ
General Knowledge
MDCAT
ECAT
GAT General
GAT Subject
Other Links
Go to Home
Online Tests
CS-301 Final Term Exams Preparation Virtual University MCQs With Answers
Question # 1
Which formula is the best approximation for the depth of a heap with n nodes?
Choose an answer
log (base 2) of n
The number of digits in n (base 10), e.g., 145 has three digits
The square root of n
n
Previous
Skip
Next
Question # 2
If there are 56 internal nodes in a binary tree then how many external nodes this binary tree will have?
Choose an answer
54
55
56
57
Previous
Skip
Next
Question # 3
While joining nodes in the building of Huffman encoding tree if there are more nodes with same frequency, we choose the nodes _______.
Choose an answer
Randomly
That occur first in the text message
That are lexically smaller among others
That are lexically greater among others
Previous
Skip
Next
Question # 4
Suppose we are sorting an array of eight integers using quick sort ,and we have just finished the first partitioning with the array looking like this
2 5 1 7 9 12 11 10
Which statement is correct?
Choose an answer
The pivot could be either the 7 or the 9.
The pivot could be the 7, but it is not the 9.
The pivot is not the 7, but it could be the 9
Neither the 7 nor the 9 is the pivot.
Previous
Skip
Next
Question # 5
_____ only removes items in reserve order as they were entered
Choose an answer
Stack
Queue
Both of these
None of these
Previous
Skip
Next
Question # 6
Suppose you implement a Min heap (with the smallest element on top) in an array. Consider the different arrays below; determine the one that cannot possibly be a heap:
Choose an answer
16, 18, 20, 22, 24, 28, 30
16, 20, 18, 24, 22, 30, 28
16, 24, 18, 28, 30, 20, 22
16, 24, 20, 30, 28, 18, 22
Previous
Skip
Next
Question # 7
Binary Search is an algorithm of searching, used with the ______ data
Choose an answer
Sorted
Unsorted
Heterogeneous
Random
Previous
Skip
Next
Question # 8
A kind of expression where the operator is present between two operands called ________ expressions .
Choose an answer
Postfix
Infix
Prefix
None of the above
Previous
Skip
Next
Question # 9
In case of deleting a node from AVL tree,rotation could be prolong to the root node.
Choose an answer
yes
no
not sure
Previous
Skip
Next
Question # 10
What is the formula of approixation for the depth of a heap with n nodes?
Choose an answer
log (base 2) of n
The number of digits in n (base 10 )e,g 145 has three digit
The square root of n
n
Previous
Skip
Next
Question # 11
While building Huffman encoding tree the new node that is the result of joining two nodes has the frequency.
Choose an answer
Equal to the small frequency
Equal to the greater
Equal to the sum of the two frequencies
Equal to the difference of the two frequencies
Previous
Skip
Next
Back