PHY-101 Quiz OnlineTest With Answers

PHY-101 Quiz OnlineTest

Sr. # Questions Answers Choice
1 What requirement is placed on an array, so that binary search may be used to locate an entry? The array elements must form a heap. The array must have at least 2 entries The array must be sorted. The array‟s size must be a power of two.
2 A complete binary tree of height ___ has node between 16 to 31. 2 3 4 5
3 Consider the following infix expression: x – y * a + b / c Which of the following is a correct equivalent expression(s) for the above? x y -a * b +c / x *y a - b c / + x y a * - b c / + x y a * - b/ + c
4 A complete binary tree of height 3 has between ________ nodes. 8 to 14 8 to 15 8 to 16 8 to 17
5 A complete binary tree us a tree that is ___ filled with the possible exception of the bottom level. partially completely incompletely partly
6 Which of the following statement statement is true about dummy node of threaded binary type? 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
7 A Threaded Binary Tree is a binary tree in which every node that does not have a right child has a THREAD (in actual sense, a link) to its __________ successor levelorder Preorder Inorder Postorder
8 Which of the following statement is correct property of binary trees? A binary tree with internal nodes has N+1 internal links A binary tree with N external nodes has 2N internal nodes. A binary tree with N internal nodes has N+ 1 external node. None of above statement is a property of the binary tree.
9 While building Huffman encoding tree the new node that is the result of joining two nodes has the frequency. 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
10 Use of binary tree in compression of data is known as _______ Traversal Heap Union Huffman encoding
11 If there are N elements in an array then the number of maximum steps needed to find an element using Binary Search is _______ N N<sup>2</sup> Nlog<sub>2 </sub>n log<sub>2</sub>N
12 A binary relation R over S is called an equivalence relation if it has following property(s) Reflexivity Symmetry Transitivity All of the given options
13 If a complete binary tree has n number of nodes then its height will be Log<sub>2</sub>(n+1)-1 2<sup>n</sup> 2<sup>n</sup>-1
14 I have implemented the queue with a linked list, keeping track of a front pointer and a rear pointer. Which of these pointers will change during an insertion into an EMPTY queue? Neither changes only front pointer charges Only rear pointer changes. Both change. Since it is an empty queue the front and rear are initialize to -1, so on insertion both the pointers will change and point to 0.
15 A queen is a data structure where elements are, 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.
16 Double link list is always has one NULL pointer True False Not Sure
17 Which of the following statement is NOT correct? In linked list the elements are necessarily to be contiguous In the linked list the elements may locate at far positions in the memory in the linked list each elements also has he address of the elements next to it In an array the elements are contiguous
18 In an array we can store data elements of different types True False Not sure
19 Let heap stored in an array as H = [50, 40, 37, 32, 28, 22, 36, 13]. In other words, the root of the heap contains the maximum element. What is the result of deleting 40 from this heap [50,32, 37,13, 28, 22, 36] according to max heap property [37, 28, 32, 22, 36, 13] [37, 36, 32, 28, 13, 22] [37, 32, 36, 13, 28, 22]
20 Suppose A is an array containing numbers in increasing order, but some numbers occur more than once when using a binary search for a value, the binary search always finds ____________ the first occurance of value the second occurrence of a value may find first or second occurrence of a value. None of the given options
Download This Set

Is this page helpful?