JNTU, B.Tech I Semester DATA STRUCTURES THROUGH C, November 2008

JNTU, B.Tech I Semester DATA STRUCTURES THROUGH C, November 2008

( Mechanical Engineering, Mechatronics, Metallurgy &Material Technology, Production Engineering, Aeronautical Engineering and Automobile Engineering)

SET-1

 

1. Write a C program to find mean, standard deviation and variance of a set of elements

 

2. Given a linked list whose typical node consists of an INFO and LINK field, formulate

an algorithm which will count the number of nodes in the list. Illustrate with a suitable example situation.

 

3. (a) Define recursion. What are the properties of recursive definition .

(b) Write a recursive definition of a + b , where a and b are nonnegative integers,in terms of the successor function succ , defined as

succ(x)

int x;

{

return (x++);

}

(c) Write a recursive algorithm to compute the product of two non negative integers

 

4. (a) Mention and explain various types of queues and give an example for each

(b) Compare various types of queues.

 

5. Write a C program for creating, inserting and deletion in a Binary tree.

 

6. (a) What are the advantages of adjacency matrix representation of graphs.

(b) Define spanning tree of an undirected graph.

 

7. (a) Distinguish between linear and binary search methods.

(b) Write an algorithm for non-recursive binary search method.

 

8. (a) Write an algorithm for selection sort

(b) Sort the following numbers using selection sort and give the required steps.

96,31,27,42,34,76,61,10,4

 

 

Leave a Comment