Thursday 11 April 2013

// // Leave a Comment

DATA STRUCTURES-MARCH-2008


FOURTH SEMESTER DIPLOMA EXAMINATION IN ENGINEERING/TECHNOLOGY-MARCH, 2008
DATA STRUCTURES
PART-A
(Maximum marks:15)
v  Answer the following questions in one or two sentences:
1.Declare an array of strings whose initial values are”red”,”green”and”blue”
2.Define union.
3.What is the performance of the insertion sort on an array which is sorted in the reverse order?
4.How does merge sort perform on an initially sorted array?
5.Declare a self referential sata structure.
6.What output will be produced by the following C code.Node is a self referential structure with a member named data:
                   Void fun(struct node *f)
                      {           
                           Struct node q=f,p=NULL;
                           While(q!=p)
                             {
                                     Printf(“%d”,q->data);
                                     Q=q->link;
                              }
                       }
7.List two applications of priority queue.
8.Translate the prefix notation[/+*3 8 4+6-3 2]to infix notation.
9.How many internal nodes does the full binary tree of height h=3 have?
10.What is the advantages of using a binary search tree?
PART-B
(Maximum marks:60)
(Answer one full question from each unit)
Unit-1
v  (a)Write a recursive function in C  language to find the sum of n element in an array.(8)
          (b)Write notes on pointer to pointer.(4)
OR
v  Write an algorithm to(i)concatenate two strings(ii)compare two strings.(12)


Unit-2
v  (a)Explain insertion sort with example.(7)
(b)Writes an algorithm to implement Binary search(5)
         
OR
v  (a)Write an algorithm for bubble sort.(7)
          (b)Trace the execution of quick sort algorithm on the list given below:
45
70
65
80
55
22
 (5)
UNIT-3
v  (a)Explain the operations insert and delete performed on singly linked list.(6)
          (b)Write an algorithm to delete an element from the linked list.(6)
OR
v  (a)With supporting diagrams explain circular link list.(6)
          (b)Write about the operations performed on it.(6)
UNIT-4
v  (a)Illustrate with suitable diagram the evaluation of the expression.(7)
(b)Write an algorithm to implement push operation on a Stack(5)
OR
v  Write an algorithm to(i)insert an element into a queue.
(ii)delete an element from a queue.(12)
UNIT-5
v  Explain the preorder traversal with an example and write an algorithm for the same.(12)
OR
v  With appropriate example explain breadth first search.(12)
        

Please Give Us Your 1 Minute In Sharing This Post!
SOCIALIZE IT →
FOLLOW US →
SHARE IT →
Powered By: BloggerYard.Com

0 comments:

Post a Comment