Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
78 views

Data Structure DS

This document contains a question bank with questions related to different topics in data structures and algorithms across 5 units: 1) Introduction to Algorithms - Questions related to analyzing algorithm performance, sorting algorithms, abstract data types, and flowcharts. 2) Stacks and Queues - Questions related to implementing and using stacks and queues. 3) Linked Lists - Questions related to implementing and using linked lists, including polynomials. 4) Trees - Questions related to implementing and traversing binary trees and expression trees. 5) Graphs and Hashing - Questions related to graph representations, traversal algorithms, minimum spanning trees, and hashing techniques. The question bank contains over 70 questions in total across the
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
78 views

Data Structure DS

This document contains a question bank with questions related to different topics in data structures and algorithms across 5 units: 1) Introduction to Algorithms - Questions related to analyzing algorithm performance, sorting algorithms, abstract data types, and flowcharts. 2) Stacks and Queues - Questions related to implementing and using stacks and queues. 3) Linked Lists - Questions related to implementing and using linked lists, including polynomials. 4) Trees - Questions related to implementing and traversing binary trees and expression trees. 5) Graphs and Hashing - Questions related to graph representations, traversal algorithms, minimum spanning trees, and hashing techniques. The question bank contains over 70 questions in total across the
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Amar Sewa Mandal

Govindrao Wanjari College of Engineering and Technology


148,149 Salai Godhani, Hudkeshwar Road, Nagpur
Department of Computer Science & Engineering
………………………………………………………………………….....

QUESTION BANK

Data Structure and Program Design


UNIT I:- INTRODUCTION TO ALGORITHM

1) How to decide performance of an algorithm? Explain big O notation in brief.


2) Sort the following array using selection sort. Also specify its time complexity 80, 27, 42, 14,
69, 22, 85.
3) Explain the Stability of an Algorithm for sorting. Give an example.
4) Write an function to implement heap sort.

6) What do you mean by Divide and conquer strategy? Give suitable example for the same.
7) What are the parameters & their roles considered for Analysis of an algorithm? Explain
asymptotic notations used for analysis of algorithms.
8) Discuss bubble sort & insertion sort with their time complexities.
9) Write a C program to implement binary search.
10) Write a detailed note on Abstract data type.
11) Explain various symbols used in a flowchart and draw a flowchart to add 10 numbers using
iterative construct.
12) How to decide performance of an algorithm ? Explain big O notation in brief.
13) Explain the concept of data structure in detail. Also explain abstract data type.
14) Give the snapshots of searching an element using linear and binary search in the given array.
20 91 32 81 75 48 05 19 08. Also comment on time complexity.
15) Write a C program to sort the elements of matrix row wise Assume that the matrix is
represented by two dimensional array

UNIT II: - STACK AND QUEUE


1) Write short notes on any two.
i) Multiple stacks.
ii) Evaluation of postfix expression.
iii) Circular Queue.
2) Write PUSH and POP algorithm for implementing stack.
3) Write an algorithm to evaluate a prefix expression using stacks. Explain it along with an
example.
4) How multiple queues are implemented using an array. Give pseudo code for insert and delete
operations.
5) Write and explain algorithm to convert an infix expression to a prefix expression. Using stack.
6) Explain the concept of circular queue with suitable example.
7) Implement a stack and its operations using a linked list.
8) Write a note on:
i) Priority queue
ii) Multiple stacks.
7) Explain polish notations. Convert the following notation to postfix using stack. Show all stack
positions A+(B*C-(D/E^F)*G)*H
8) Explain and illustrate the concept of circular queue.
9) Write a program in C to implement a stack. You should write user defined functions for each
valid operation on stack.
10) Explain i) Priority queue ii) Doubly ended queue

UNIT III :- LINK LIST


1)Write a procedure to check whether two linked list are equal or not.
2) Draw generalized list for the following expression:

3) Discuss the methods of dynamic memory allocation.


4) Give suitable representation for polynomials and write an algorithm to add two polynomials.
5) Write a Menu Driven program for various operation of singly linked list.
6) Given a singly linked test L, formulate separate routines / algorithms to
a) Insert an element X after a position P in the list.
b) Delete the first occurrence of an element Y from the list.
7) Explain dynamic memory allocation with example.
8) Write an algorithm to add two polynomials using a linked list.
9) Explain with an algorithm and diagrammatic illustrations how insertions and deletions can be
performed on a doubly linked list.
10) Give suitable representation for a polynomial and write an algorithm to add two polynomials.
11) What are different functions for dynamic memory allocation in 'C' ? Explain with examples.
12) What is Doubly Linked list ? Write an algorithm to reverse the links of singular linear linked
list ?
13) Write a note on :
i) Singly linked list
ii) Circular linked list.
UNIT IV:- TREE
1)Draw the tree, represented for the following prefix expression:
i) * a+ b *c -de
ii) B -C * D- E * F / K / L- F
iii) * +abc / df
iv) *+ abc- df
2) What is an AVL tree? Explain with suitable example, how height is balanced in an AVL tree
after a new insertion.
3) Write short notes on threaded binary trees.
4) Write an algorithm for Postorder traversal of Binary Tree (Non-recursive).
5) What is a binary search tree? Construct a BST for the following sequence: M, Z, C, X, Y, O,
K, I, E, H, N Also traverse the tree with all three approaches.
6) What is Expression tree? Draw an expression tree for A  ( B  C  D  E )  F / G
7) Explain Binary tree and its types with suitable example.
8) Write a note on threaded binary tree.
UNIT V:- GRAPH & HASHING
1) How many minimum spanning trees does the following graph have? Draw them.

2) Define the following.


i) Complete graph.
ii) Degree of graph.
iii) Path of graph.
iv) Strongly connected component.
v) Isolated vertex.
vi) Hamiltonian path.
3)Describe DFS algorithm. Find out the DFS traversal of the following graph starting at node A

4) Suppose graph is stored in memory. Write a non-recursive procedure for breadth. First search
traversal of a graph.
5) What is a graph and what are its applications? Discuss various ways of representation of a
graph.
6) Construct a minimum cost spanning tree (MST) for the given graph using Kruskal's algorithm.

7) Write and explain the algorithm for DFS graph traversal with ex ample.
8) For the following graph:

Write:
i)Indegree and outdegree for each vertex.
ii) Adjacency matrix. I
ii) Adjacency list.
iv) Adjacency multi list.
HASHING :-
1) Using Division method of hashing for a table of size 11, store the following numbers in a hash
table 64, 98, 123, 200, 214, 193, 163, 201.
2) What are the different collision handling mechanisms? Explain any two with suitable
example.
3) Explain the following collision handling techniques.
i) Linear Probing.
ii) Quadratic probing.
iii) Double hashing.
4)Give the following list of elements 22, 26, 89, 45, 12, 32, 90, 55, 69, 96 and the hash function :
(Index = key % 10). Show the hash table. Use collision Resolution through Linear probing.
5) Explain two techniques to overcome hash collision.
6) Differentiate between static and dynamic hash tables.
7) What is hashing? Explain division method of hashing to store the following values in has h
table 25, 45, 96, 101, 102, 162, 197, 201, 84 Use suitable collision handling mechanism.
8) What is symbol table? What is the use of symbol table? Describe the implementation of
symbol table?

Subject Teacher
Prof. P. S. Gumgaonkar

You might also like