Question Paper -Data Structures through "C" and "PASCAL"

1. (a) Write an algorithm to multiply two polynomials using linked list.

(b) Let T be a binary tree with height h and n nodes. Show that log(n + 1)- 1 < = h < = (n - 1)/2. For which values of n and h can the above lowest upper bounds of h be attained equality.

(c) Write an algorithm to implement the bubble sort and sort the following list in ascending order using bubble sort :
13, 24, 5, 19, 2, 17, 4

(d) List any three disadvantages of sequential file organization.

(e) Write an algorithm to insert a node before a given node in a linked list.

2. (a) Write an algorithm to convert the following infix expression to the postfix expression and illustrate the position of stack after each step :
z + (y*x-(w/v ? u)*t)*s

(b) Write a recursive algorithm for two way merge sort.



3.Write an algorithm for insertion and deletion of elements in a Queue.

4. (a) Write an algorithm for the breadth first traversal of a graph.

(b) Write an algorithm to insert a node into a Binary Search Tree.

5. (a) What is Direct File organization ? Explain any two advantages of Direct File organization over Sequential File organization.

(b) Write an algorithm for performing Binary Search. What is the condition to perform Binary Search ?

Replies

You are reading an archived discussion.

Related Posts

to know more topics for seminar
sir i am a ECE final yr. student searching project topics in Embedded system or RFID based. please suggest me some use topics. since i am very confused of the...
Hai Folks, strangely Facebook keeps acting weird. It's got the new and smaller font size and some extra newbies which are sure to complicate things. Why is it trying to...
Of late there are many queries on recovering energy from ambient sources like vehicle speed breakers,vehicles traversing level roads etc. Excluding the blatantly perpetual motion based schemes, most of the...