Professional Documents
Culture Documents
UNITwiseUniversityQuestion Bank - Students
UNITwiseUniversityQuestion Bank - Students
Sr.
Unit I: Introduction to Algorithm & Program Design
No.
Sort following data using bubble sort & Insertion sort. Show all
Q.1 the steps and dicuss on time complexity.
20 5 18 7 21 6 (6) May 2014
Q.2 Explain the term Data Structure and its operations (6)
Q.3 What is time complexity of an algorithm? Explain with suitable
example. (6)
What will be output of following code? (6)
Justify your answer.
for(i=o;i<3;i++)
{
for(j=0;j<3;j++)
Q.4 { May 2013
a[i][j]=10 * (i+j);
printf(“%d”,a[i][ j]);
}
printf(“\n”);
}
printf('%d%d”,i,j);
Q.5 Write an algorithm for linear search technique. (6)
Q.6 Discuss the different phases of creating program. (6) May 2013
Q.7 what will be the output of following code? (6)
Justify your answer.
Void f(intx,int * p)
{
x =x +10 ;
* p = * p+x ;
}
void main( )
{
int a=10,b=20;
f(a, &b);
printf(“%d %d “,a,b);
DATA STRUCTURE AND ALOGORITHMS
}
Sort following data using bubble sort & Insertion sort.Comment
Q.8 on numberof comparisons & number of swaps /shifts required.
35 17 2 13 10(6)
Define a structure which can store real & imaginary parts of a
Q.9 complexnumber.Declare two variables of the types of this
structure. Store twocomplex numbers in them & Display them.
(4)
Explain following terminologies. (6)
Q1
(i)Data type
0 (ii)Data structure
(iii)Abstract Data Type.
Sort the following table of numbers using :
(i) Bubble Sort
Q1
(ii) Insertion Sort
1 AVBCDXP
Show every pass in detail.Define Time Complexity and write down Dec 2012
Time Complexity for the above sorting methods. [8]
Q1
Write pseudo ‘C’ algorithm for Binary search. [4]
2
Q1
Define ADT. Write down ADT of arrays. [4]
3
Q1
Write a function in ‘C’ to implement selection sort. [6]
4
Dec 2012
Q1
Define Recursive Function in ‘C’ and explain with example in
5 detail. [6]
Q1
Explain with example row major and column major storage
6 representation in two-dimensional arrays. [4]
Q1 Dec 2016
Write a C function with and without pointers to array for
7 checking whether the given string is palindrome or not [6]
Q1 Write a C function for binary search. Compare the time
DATA STRUCTURE AND ALOGORITHMS
Q2
Explain with suitable example how do you pass structure
7 variable to a function [6]
Q2
What is pointer? What are advantages using pointer? Explain
8 pointer declaration and initialization with an example [6]
Sr.
No. Unit III: Linked Lists
UNIT Outcomes:
03 1. Able to create SLL,DLL Data structures for real application
2. Able to understand Dynamic Memory implementation.
Reference Books Used:
04 1. E Balgurusamy - Programming in ANSI C, Tata McGraw-Hill (Third Edition)
2. YedidyahLangsam, Moshe J Augenstein, Aaron M Tenenbaum – Data structures using C
and C++ - PHI Publications ( 2nd Edition ).
05 Unit related Online Questions:
Sr University
Question Question
No
Explain node structure of Doubly Linked List and explain its SE IT2012
advantages. [4]
DATA STRUCTURE AND ALOGORITHMS
(762)
Define Circular Linked List and compare with respect to SLL. [4]
Write a function in ‘C’ to delete a node in Doubly Linked
List. [6]
Write down advantages of Linked list over arrays. [6]
Write pseudo ‘C’ algorithm to insert a node in Singly Linked
List with all possible conditions. [6]
Explain circular DLL with example. [4]
SE e&tc May-
12
(401)
Sr University
No Question Marks Question
Define the following with examples : [8] SE IT2012
(i) Complete Binary Tree (762)
4
(ii) Predecessor and Successor
(iv) OBST.
What is the necessity of converting a tree into binary
tree ? Convert the following tree into a binary tree and list
6
down the steps for the same. [8]
Or
Write functions for non-recursive pre-order and in-order 6
traversal
algorithms for a in-order threaded binary tree. [8]
DATA STRUCTURE AND ALOGORITHMS
UNIT Outcomes:
03 3. Student will able to understand real application of Hierarchical behaviour.
4. Create Tree data structure and primitive operations on structure
Sr University
No Question Marks Question
1. Write a function to create GRAPH using adjacency matrix SE IT2012
4
method. (762)
2. For the graph given in Fig. 1, draw minimum cost spanning tree using
Prim’s algorithm, show all steps : [6]
Sr.
No. Unit IV :Stacks, Queues, Recursion
01 Stacks: Concept, Array representation of stacks, Linked Course
representation of stacks, Stack as ADT, Arithmetic learning
expressions; Polish notation. Application of stacks: Objectives:
Recursion, Implementation of recursive procedures by 1,2,4
stacks.
Queues: Concept, Array representation of queues, Linked
representation of queues, Queue as ADT, Circular queues,
DATA STRUCTURE AND ALOGORITHMS
UNIT Outcomes:
03 1. Able to create Stack and Queue Data structures for real application
2. Able to understand Real Memory implementation.
Reference Books Used:
1. E Balgurusamy - Programming in ANSI C, Tata McGraw-Hill (Third
04 Edition)
2. YedidyahLangsam, Moshe J Augenstein, Aaron M Tenenbaum – Data
structures using C and C++ - PHI Publications ( 2nd Edition ).
05 Unit related Online Questions: UQP
Q1 Differentiate static and dynamic memory allocation. [4] May2014
Signature of Faculty