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
PHY-101 Quiz OnlineTest MCQs With Answers
Question # 1
Which of the following statement statement is true about dummy node of threaded binary type?
Choose an answer
This dummy node never has a value
This dummy node has always some dummy values
This dummy node has either no value or some dummy value
This dummy node has always some integer value
Previous
Skip
Next
Question # 2
Which of the following statement is NOT true about find operation :
Choose an answer
It is not a requirement that a find operation returns any specific name, just that finds on two elements return the same answer if and only if they are in the same set.
One idea might be to use a tree to represent each set, since each element in a tree has the same root, thus the root can be used to name the set.
Initially each set contains one element.
initially each set contains one element and it does not make sense to make a tree of one node only.
Previous
Skip
Next
Question # 3
The definition of transitive property is
Choose an answer
For all element x member of S, x R x
For all elements x and y, x R y if and only if y R x
For all elements x, y and z, if x R y and y R z then x R z
For all elements w, x, y and z, if x R y and w R z then x R z
Previous
Skip
Next
Question # 4
If both pointers of the node in a binary tree are NULL then it will be a/an _______ .
Choose an answer
Inner node
Leaf node
Root node
None of the given options
Previous
Skip
Next
Question # 5
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 # 6
If you know the size of the data structure in advance, i.e., at compile time, which one of the following is a good data structure to use.
Choose an answer
Array
List
Both
None of the above
Previous
Skip
Next
Question # 7
By using __________we avoid the recursive method of traversing a Tree, which makes use of stacks and consumes a lot of memory and time.
Choose an answer
Binary tree only
Threaded binary tree
Heap data structure
Huffman encoding
Previous
Skip
Next
Question # 8
Searching of an element in an AVL tree take minimum ____ time (where n is number of nodes in AVL tree)
Choose an answer
Log
2
(n+1)
Log
2
(n+1) -1
1.44 Log
2
n
1.66 Log
2
n
Previous
Skip
Next
Question # 9
A binary tree with N internal nodes has ____ links ,links to internal node and ____links to external
Choose an answer
N+1, 2N, N-1
N+1, N-1, 2N
2N, N-1, N+1
N-1, 2N, N+1
Previous
Skip
Next
Question # 10
Binary Search is an algorithm of searching, used with the ______ data
Choose an answer
Sorted
Unsorted
Heterogeneous
Random
Previous
Skip
Next
Question # 11
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 # 12
We are given N items to build a heap ,this can be done with ______ successive inserts.
Choose an answer
N-1
N
N+1
N+2
Previous
Skip
Next
Question # 13
Which of the following statement is true about dummy node of threaded binary tree
Choose an answer
The left pointer of dummy node points to the itself while the right pointer points to the root of tree.
The left pointer of dummy node points to the root node of the tree while the right pointer points itself i.e. to dummy node
The left pointer of dummy node points to the root node of the tree while the right pointer is always NULL
The right pointer of dummy node points to the itself while the left pointer is always NULL
Previous
Skip
Next
Question # 14
A queen is a data structure where elements are,
Choose an answer
inserted at the front and removed from the back
inserted and removed from the top.
inserted at the back and removed from the front.
inserted and removed from both ends.
Previous
Skip
Next
Question # 15
Merge sort and quicksort both fail into the same category of sorting algorithms,What is this category ?
Choose an answer
O(nlogn) sorts
Interchange sort
Average time is quadratic
None of the given options.
Previous
Skip
Next
Question # 16
Every AVL is
Choose an answer
Binary tree
Complete tree
None of these
Binary Search tree
Previous
Skip
Next
Question # 17
"+” is a _________operator.
Choose an answer
Unary
Binary
Ternary
None of the above
Previous
Skip
Next
Question # 18
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 # 19
Use of binary tree in compression of data is known as _______
Choose an answer
Traversal
Heap
Union
Huffman encoding
Previous
Skip
Next
Question # 20
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
Question # 21
The maximum number of external nodes for a binary tree of Height H is ____
Choose an answer
2
h
2
h
+1
2
h
+2
2
h
+3
Previous
Skip
Next
Back