FINALTERM EXAMINATION
Fall 2009
CS301- Data Structures
Question No: 1 ( Marks: 1 ) - Please choose one

► 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

► 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

► ab+c*d-
► abc*+d-
► abc+*d-
► (abc*)+d-
Question No: 4 ( Marks: 1 ) - Please choose one

► Arrays
► Lists
► Both of these
► None of these
Question No: 5 ( Marks: 1 ) - Please choose one

► (last % 1) + CAPACITY
► last % (1 + CAPACITY)
► (last + 1) % CAPACITY
► last + (1 % CAPACITY)
Question No: 6 ( Marks: 1 ) - Please choose one

► 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

►Binary Tree
►Binary Search Tree
►Parse Tree
►AVL Tree
Question No: 8 ( Marks: 1 ) - Please choose one

►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

► data[1]
► data[n-1]
► data[n]
► data[2*n+1]
Question No: 10 ( Marks: 1 ) - Please choose one

► 54
► 55
► 56
► 57
Question No: 11 ( Marks: 1 ) - Please choose one

► increaseKey(p,delta)
► decreaseKey(p,delta)
► preculateDown(p,delta)
► remove(p,delta)
Question No: 12 ( Marks: 1 ) - Please choose one

► Reflexive
► Symmetric
► Transitive
► Associative
Question No: 13 ( Marks: 1 ) - Please choose one

► Electrical connectivity
► Set of people
► <= relation
► Set of pixels
Question No: 14 ( Marks: 1 ) - Please choose one

► 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

► Sorted
► Unsorted
► Heterogeneous
► Random
Question No: 16 ( Marks: 1 ) - Please choose one

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

► 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

► 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

► 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

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

► n-1
► n log n
► n2
► 1
Question No: 22 ( Marks: 1 ) - Please choose one

► 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

► 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

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

► 2H
► 2H +1
► 2H -1
► 2H +2
Question No: 26 ( Marks: 1 ) - Please choose one

► 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

► left,right
► right,left
► up,down
► down,up
Question No: 28 ( Marks: 1 ) - Please choose one

► 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

► 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

► [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.