CS-301 Final Term Exams Preparation Virtual University With Answers

image
image
image

CS-301 Final Term Exams Preparation Virtual University

Sr. # Questions Answers Choice
1 I have implemented the queue with a circular array. If data is a circular array of CAPACITY elements, and last is an index into that array, what is the formula for the index after last? (last % 1) + CAPACITY last % (1 + CAPACITY) (last + 1) % CAPACITY last + (1 % CAPACITY)
2 In sequential access data structure ,accessing any element in the data structure takes different amount of time.Tell which one of the following is sequential access data structure. Arrays Lists Both of these None of these
3 Which one of the following is valid postfix expression? ab+c*d- abc*+d- abc+*d- abc*)+d-
4 In an array list the current element is the first element the middle element the last element The element where the current pointer points to
5 The data of the problem is of 2 GB and the hard disk is of 1 GB capacity,to solve this problem we should use better data structure Increase the hard disk space Use the better algorithm Use as much data as we can store on the hard disk
6 Which of the following is a non linear data structure? Linked List Stack Tree Queue
7 Which traversal gives a decreasing order of elements in a heap where the max element is stored at the top? post-order level -order in order none of the above
8 Consider the following paragraph with blanks. A …….…….. is a linear list where …………… and ………… take place at the same end . This end is called the …….………. What would be the correct filling the above blank positions? (i) queue (ii) insertion (iii) removals (iv) top (i) stack (ii) insertion (iii) removals (iv) bottom (i) stack (ii) insertion (iii) removals (iv) top (i) tree (ii) insertion (iii) removals (iv) top
9 While joining nodes in the building of Huffman encoding tree if there are more nodes with same frequency, we choose the nodes _______. Randomly That occur first in the text message That are lexically smaller among others That are lexically greater among others
10 Which formula is the best approximation for the depth of a heap with n nodes? 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
Download This Set