midtermds

Upload: anonymous-aym8hnodi

Post on 08-Apr-2018

213 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/7/2019 midtermds

    1/2

    Vidya Vikas Pratishthan Institute of Engineering & Technology, Solapur

    Computer Science & Engineering Department

    Mid Term

    Subject: Data Structures-II Class: S.E. (CSE)

    Date: 17-03-2011 Marks: 50

    ________________________________________________________________________Q1.Objective Type Questions (1*10=10)1. Time complexity is

    a) Space required by programb) Time required for programmer

    c) Amount of machine time necessary for running a programd) All of above

    2. Which of the following steps is performed for inorder traversal of a binary tree?a) Traversal of left subtree in postorder b) Processing of root node

    c) Traversal of left subtree in inorder d) None of these3. Number of nodes in a complete binary tree of depth K is

    a)

    b) 2k c)2k-1 d)None of above4. Advantage of chained hash table over the open addressing scheme is

    a) Worst case complexity of search operations b) Space used is lessc) Deletion is easier d) none of these

    5. Which of the following is not collision resolution technique?a)Linear probing b)chaining c)truncation d)none

    6. A binary tree in which every non-leaf node is filled with left and right sub-trees iscalled

    a) AVL Tree b) B-Tree c)B+tree d)strictly Binary Tree7. A node that has only out degree but not in degree is called

    a) Pendant Node b) Isolated Node c) Source node d) Destination Node

    Consider the following Binary tree

    8. Write inorder traversal.9. Subling of B are

    a) 1 b) 2 c) 3 d) 410. Height of tree is

    a) 1 b) 2 c) 3 d) 4

    A

    B E

    C

  • 8/7/2019 midtermds

    2/2

    Q2.Solve any four: (4*5=20)1. List advantages and disadvantages of chaining, a collision resolution technique in

    hashing2. Write a C function for searching a node in Binary Search Tree.

    3. Explain asymptotic notations with suitable examples.

    4. What is threaded binary tree? Explain types of threaded binary tree with suitableexample.5. Define and explain following terms with suitable example.

    i) Hashing ii) Hash function iii) hash addressiv) Hash overflow v) overflow area.

    Q3.Answer any two (10*2=20)1. What are principal criteria used for choosing hash functions? Explain different

    techniques used to build hash function with suitable example.2. Define binary tree with suitable example. Also define and give example of following

    terms:i) Strictly Binary Tree ii)Almost complete binary tree

    iii) Complete Binary Tree iv)Extended Binary Tree3. Write a C program to create Binary Search Tree and perform Depth First Traversal and

    Breadth first Traversal.

    =======================ALL THE BEST============================