You are on page 1of 3

MODEL PAPER 1

PART – A

Answer ALL questions 5x2 = 10

1. What is under flow and over flow condition with respect to Stack operations?
2. List out applications of Queue data structure?
3. Explain terms a) Root b)Leaf c) Graph.
4. Define time complexity? What is time complexity of binary search?
5. Find out inorder, preorder and post order traversal the below tree.

PART – B

Answer any THREE of the following 3x10= 30

6. a). Write a C program to implement stackADT using an Array? 5M


b). Evaluate the postfix expression 456*+7- . 5M
(OR)
7. a) Explain StackADT operations 4M
b) Write a C proram to Implement Stack ADT using Linked List. 6M

8. a) Write a C program to Implement QueueADT using array. 5M


b) Explain binary tree traversal techniques with examples. 5M
(OR)
9. a) Write a C program to Implement Queue ADT using Linked List. 7M
b) Define graph and its terminology with diagram. 3M

10. a) Write a C program to find an element in an array using linear search. 5M


b) Explain step by step procedure for the list of elements 5 1 4 2 8 using 5M
bubble sort
(OR)
11. a) Write a C program to implement binary search. 5M
b) Write a c program to sort the list of numbers using Selection sort. 5M
MODEL PAPER 2

PART – A

Answer ALL questions 5x2 = 10

1. What do you understand about an abstract data type? Give examples


2. Draw the expression tree for (a – b ) / ( c + d)
3. What is an adjacency matrix.
4. Derive the time complexity of the following code snippet
for ( i = 0; i< n ; i ++ )
for ( j = 0; j <=i; j ++ )
printf(“%d” , m[i][j] );

5. Write the differences between a tree and a graph?

PART – B

Answer any THREE of the following 3x10= 30

6. Write a C function to evaluate a postfix expression consisting of single digit operands?


10M
(OR)
7. a) Implement array stack operations as C functions 6M
b) Convert the expression ( 1 – 2 ) * ( 3+ 4) into post-fix and evaluate it 4M

8. a) What are the differences between arrays and linked lists. 5M


b) Implement queue operations in C using linked list. 5M
(OR)
9. a) Implement a C function that returns true if all the elements in a linked list are in ascending
order and false otherwise 7M
b) Explain different methods of representing a binary tree in computer memory. 3M

10. a) Write a recursive function for binary search 5M


b) Apply binary searchon the following list in finding the key 31 5M
12, 23, 34, 45, 56, 67, 78, 89
(OR)
11. a) Write a C function to implement insertion sort. 5M
b) Write an example for worst case input for insertion sort. 5M
MODEL PAPER 3

PART – A

Answer ALL questions 5x2 = 10

1. Convert the expression (A+B)*(C-D) to its equivalent postfix expression?


2. Write the overflow condition for array implementation of queue?
3. Write the pre-condition to apply binary search on a list.
4. When do you say that a sorting technique is stable?
5. If pre-order traversal of a binary tree is given as : A, B, D, C, E, G, F, H, I and in-order traversal
is given as :B, D, A, G, E, C, H, F, I then draw the binary tree.

PART – B

Answer any THREE of the following 3x10= 30

6. a). Write a C program to convert infix to post fix ? 5M


b). Write the stack trace in converting infix expression ( a –b) * c into post-fix 5M
(OR)
7. a) Implement C functions of stack operations using arrays. 6M
b) Write the applications of stack 4M

8. a) Write a C function to count the number of nodes in a linked list. 6M


b) Define the structure for representing the node of a binary tree and write the C statements to
allocate memory for a node. 4M
(OR)
9. a) Write the applications of queue data structures. 4M
b) Discuss the methods of representing a graph in computer memory. 6M

10. a) Write a C function to find an element in an array using binary search. 6M


b) Trace selection sort and write the steps for the following input 4M
23, 12, 15, 32, 53, 9, 17
(OR)
11. a) Write a recursive function to implement sequential search. 5M
b) Write a C function to sort the list of numbers using Quick sort. 5M

You might also like