ds-ii ut-ii qp

4
Savitribai Phule Shikshan Prasarak Mandal’s SKN SINHGAD COLLEGE OF ENGINEERING A/P: Korti Tal: Pandharpur Dist: Solapur UUU Day and Date: /03/2013 Max. Marks: 50 Time: 08.30 am to 10.00 am Branch: S.E (CSE) Subject: Data structure - II Q.1. MCQ / Objective Question Paper. (1 Mark Each) 1) A Binary Tree in which every non leaf node is filled with left & right sub tree is called a) AVL Tree b) Binary Tree c) Full Binary Tree d) Strictly Binary Tree 2) Consider {50,22,11,78,16,95,7,75,51,41} If one uses quick sort for sorting these integer, how many pivot values are required if last element of respective sub array is selected as pivot element. a) 7 b) 8 c) 4 d) 6 3) -------------- is the fastest sorting techniques when array has maximum number of elements unsorted. a) Quick sort b) Merge Sort c) Bubble Sort d) None 4) A directed graph contains maximum numbers of edges equal to Roll No : Unit Test II

Upload: abhiraj1234

Post on 13-Apr-2015

3 views

Category:

Documents


0 download

DESCRIPTION

scasaf

TRANSCRIPT

Page 1: DS-II UT-II QP

Savitribai Phule Shikshan Prasarak Mandal’s

SKN SINHGAD COLLEGE OF ENGINEERINGA/P: Korti Tal: Pandharpur Dist: Solapur

UUU Day and Date: /03/2013 Max. Marks: 50 Time: 08.30 am to 10.00 am Branch: S.E (CSE)

Subject: Data structure - II

Q.1. MCQ / Objective Question Paper. (1 Mark Each)

1) A Binary Tree in which every non leaf node is filled with left & right sub tree is calleda) AVL Tree b) Binary Tree c) Full Binary Tree d) Strictly Binary Tree

2) Consider {50,22,11,78,16,95,7,75,51,41} If one uses quick sort for sorting these integer, how many pivot values are required if last element of respective sub array is selected as pivot element.

a) 7 b) 8 c) 4 d) 6 3) -------------- is the fastest sorting techniques when array has maximum number of elements unsorted.a) Quick sort b) Merge Sort c) Bubble Sort d) None

4) A directed graph contains maximum numbers of edges equal to a) n(n-1)/2 b) n(n-1) c) n/2 d) n(n+1)/2

5) In ------------- Tree, all the null pointers are replaced by special nodes then resulting tree is called as.a) Binary tree b) Extended Binary Tree c) B+ Tree d) Full Binary Tree

6) A strictly binary tree with n leaf nodes always has ------------ nodesa) n-1 b) n(n-1) c) n(n-1)/2 d) 2n-1

7) Which of the following sorting procedure is slowest?a) Quick sort b) Heap sort c) Shell sort d) Bubble sort

8) The maximum number of nodes in binary tree of depth k is

a) b) 2k-1 c) d)

9) What is the preorder traversal of following sequence 1, 2, 3, 4, 5, 6, 7, 8a) 53124786 b) 53126487 c) 53241678 d) 53124768

Roll No:

Unit Test II

Page 2: DS-II UT-II QP

10) The number of nodes in complete binary tree of level 5 is?a) 15 b) 25 c) 63 d) 71

Q.2) Explain the deletion and insertion of node in binary search tree. 10 M

Q.3) Attempt the following questions (any four ) (4*5= 20 M)

1) Define Binary Search Tree. Show all 3 traversal orders for following BST

2) Write a C program to implement Merge sort.

3) Suppose the following sequences list the nodes of a binary tree T in preorder & inorder, respectively;

Preorder : G, B, Q, A, C, K, F, P, D, E, R, HInorder : Q, B, K, C, F, A, G, P, E, D, H, R

Draw the diagram of the tree and also its post order.

4) Define searching and sorting. What is the difference between linear and binary search.

5) Explain the representation of tree in memory.

Q.4) Solve any one. 10 M

1) Write a note on Shell sort.

2) Write a C program for implementing quick sort.

|| BEST OF LUCK ||