PROMOTE MY BLOG: JUST CLICK BELOW BUTTON

Search Any Paper On This Blog

Friday, July 15, 2011

CS301 Finalterm Solved Paper 2009

     FINALTERM  EXAMINATION
Fall 2009
CS301- Data Structures
Question No: 1    ( Marks: 1 )    - Please choose one
 The data of the problem is of 2GB and the hard disk is of 1GB capacity, to solve this problem we should 

         Use better data structures
       Increase the hard disk space 
       Use the better algorithm 

         Use as much data as we can store on the hard disk 
   
Question No: 2    ( Marks: 1 )    - Please choose one
  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 
   
Question No: 3    ( Marks: 1 )    - Please choose one
 Which one of the following is a valid postfix expression?

       ab+c*d-
       abc*+d-
       abc+*d-
       (abc*)+d-
   
Question No: 4    ( Marks: 1 )    - Please choose one
 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, Linked list

       Arrays

       Lists

       Both of these

       None of these

   
Question No: 5    ( Marks: 1 )    - Please choose one
 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? http://allvupastpapers.blogspot.com.com
       (last % 1) + CAPACITY
       last % (1 + CAPACITY)
       (last + 1) % CAPACITY
       last + (1 % CAPACITY)
   
Question No: 6    ( Marks: 1 )    - Please choose one
 Which one of the following is TRUE about recursion?

       Recursion extensively uses stack memory.

        Threaded Binary Trees use the concept of recursion.

       Recursive function calls consume a lot of memory.

       Iteration is more efficient than iteration.

  
Question No: 7    ( Marks: 1 )    - Please choose one
 Compiler uses which one of the following to evaluate a mathematical equation,

Binary Tree

Binary Search Tree

Parse Tree

AVL Tree

   
Question No: 8    ( Marks: 1 )    - Please choose one
 Which one of the following is TRUE about iteration?  http://allvupastpapers.blogspot.com.com

Iteration extensively uses stack memory.

Threaded Binary Trees use the concept of iteration.

Iterative function calls consumes a lot of memory.

Recursion is more efficient than iteration.

   
Question No: 9    ( Marks: 1 )    - Please choose one
 If a max heap is implemented using a partially filled array called data, and the array contains n elements (n > 0), where is the entry with the greatest value? Data[0]

       data[1]
       data[n-1]
       data[n]
       data[2*n+1]
   
Question No: 10    ( Marks: 1 )    - Please choose one
 If there are 56 internal nodes in a binary tree then how many external nodes this binary tree will have?

       54
       55
       56
       57
   
Question No: 11    ( Marks: 1 )    - Please choose one
 Which of the following heap method increase the value of key at position ‘p’ by the amount ‘delta’?

       increaseKey(p,delta)
       decreaseKey(p,delta)
       preculateDown(p,delta)
       remove(p,delta)
   
Question No: 12    ( Marks: 1 )    - Please choose one
 If we have 1000 sets each containing a single different person. Which of the following relation will be true on each set:
       Reflexive 
         Symmetric 
         Transitive
          Associative
   
Question No: 13    ( Marks: 1 )    - Please choose one
 Which one of the following is not an example of equivalence relation: 

       Electrical connectivity 
       Set of people
       <= relation 
       Set of pixels 
   
Question No: 14    ( Marks: 1 )    - Please choose one
 A binary tree of N nodes has  _______.

       Log10 N levels 
       Log2 N levels 
       N / 2 levels 
       N x 2 levels 
   
Question No: 15    ( Marks: 1 )   http://allvupastpapers.blogspot.com.com - Please choose one
 Binary Search is an algorithm of searching, used with the ______ data.
       Sorted
       Unsorted
       Heterogeneous
       Random
   
Question No: 16    ( Marks: 1 )    - Please choose one
 Consider te following array
  23  15  5  12  40  10  7
After the first pass of a particular algorithm, the array looks like
1.      5  12  23  10  7  40
Name the algorithm used

       Heap sort
       Selection sort
       Insertion sort
       Bubble sort
   
Question No: 17    ( Marks: 1 )    - Please choose one
 Which of the following statements is correct property of binary trees? 
       A binary tree with N 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 nodes. 
       None of above statement is a property of the binary tree. 
   
Question No: 18    ( Marks: 1 )    - Please choose one
 Which of the following is a property of binary tree?
       A binary tree of N external nodes has N internal node.
       A binary tree of N internal nodes has N+ 1 external node.
       A binary tree of N external nodes has N+ 1 internal node.
       A binary tree of N internal nodes has N- 1 external node.
   
Question No: 19    ( Marks: 1 )    - Please choose one
 Which of the following statement is true about dummy node of threaded binary tree?
       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.
   
Question No: 20    ( Marks: 1 )    - Please choose one
 If the bottom level of a binary tree is NOT completely filled, depicts that the tree is NOT a
http://allvupastpapers.blogspot.com.com
       Expression tree
       Threaded binary tree
       complete Binary tree
       Perfectly complete Binary tree
   
Question No: 21    ( Marks: 1 )    - Please choose one
 In a selection sort of n elements, how many times the swap function is called to complete the execution of the algorithm?

       n-1
       n log n
       n2
       1
 
Question No: 22    ( Marks: 1 )    - Please choose one
 Which of the following statement is correct about find(x) operation: 

       A find(x) on element x is performed by returning exactly the same node that is found. 
        A find(x) on element x is performed by returning the root of the tree containing x. 
        A find(x) on element x is performed by returning the whole tree itself containing x.
       A find(x) on element x is performed by returning TRUE. 
   
Question No: 23    ( Marks: 1 )    - Please choose one
 Which of the following statement is NOT correct about find operation: 

           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. 
   
Question No: 24    ( Marks: 1 )    - Please choose one
 Consider the following postfix expression S and the initial values of the variables.

S = A B - C + D E F - + ^
Assume that A=3, B=2, C=1, D=1, E=2, F=3

What would be the final output of the stack?

       1
       2
       0
       -1
   
Question No: 25    ( Marks: 1 )    - Please choose one
 The maximum number of external nodes (leaves) for a binary tree of height H is _________ http://allvupastpapers.blogspot.com.com
       2H       
       2H +1
       2H -1
       2H +2
   
Question No: 26    ( Marks: 1 )    - Please choose one
 In threaded binary tree the NULL pointers are replaced by ,

       preorder successor or predecessor
       inorder successor or predecessor
       postorder successor or predecessor
       NULL pointers are not replaced
   
Question No: 27    ( Marks: 1 )    - Please choose one
 In a min heap ,  preculate Down procedure will move smaller value______ and bigger value______.
       left,right
       right,left
       up,down
       down,up
   
Question No: 28    ( Marks: 1 )    - Please choose one
 Which of the following statement is correct about union: 
       To perform Union of two sets, we merge the two trees by making the root of one tree point to the root of the other. 
         To perform Union of two sets, we merge the two trees by making the leaf node of one tree point to the root of the other. 
       To perform Union of two sets, merging operation of trees in not required at all. 
       None of the given options.
   
Question No: 29    ( Marks: 1 )    - Please choose one
 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 occurrence of a value.
       the second occurrence of a value.
       may find first or second occurrence of a value.
       None of the given options.
   
Question No: 30    ( Marks: 1 )    - Please choose one
 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]
       [37, 28, 32, 22, 36, 13]
       [37, 36, 32, 28, 13, 22]
       [37, 32, 36, 13, 28, 22]




By : ADEEL ABBAS 
www.allvupastpapers.blogspot.com 
AdeelAbbasbk@gmail.com

No comments:

Post a Comment

PLEASE COMMENT ABOUT YOUR VISIT AND MY SITE

Note: Only a member of this blog may post a comment.