LOYOLA COLLEGE (AUTONOMOUS), CHENNAI – 600 034 B.C.A. DEGREE EXAMINATION – COMPUTER APPLICATIONS SUPPLEMENTARY EXAMINATION – JUNE 2007 CA 4500 - DATA STRUCTURES & ALGORITHMS Date & Time: 27/06/2007 / 9:00 - 12:00 Dept. No. PART – A Max. : 100 Marks (10 x 2 = 20) Answer ALL the questions: 1. Define Algorithm. 2. Illustrate the structured flow chart for if statement. 3. Draw the step table for finding sum of ‘n’ numbers. 4. What is the use of Greedy method? 5. Differentiate Stack and Queue. 6. Write an algorithm to reverse the elements in a list. 7. Diagrammatically show the working of linear search. 8. Give an example for shell sorting. 9. What is the difference between a directed graph and an undirected graph? 10. Differentiate tree and binary tree. (5 x 8 = 40) PART - B Answer ALL the questions: 11. a) Write the Iterative structure and draw the structured flow chart for sorting the numbers in ascending order. (Or) b) What are the steps that are required for the complete development of an Algorithm? 12. a) List few Algorithm specifications with examples. (Or) b) Explain the 8-queen’s problem with an example. 13. a) Explain the addition and deletion of nodes in a linked list with algorithms. (Or) b) Explain the addition of two polynomials with an example and an algorithm. 14. a) Explain Binary Search with an example. (Or) b) Explain Bucket Sort with an algorithm. 15. a) Explain Depth first search and Breadth first search with examples. (Or) b) Explain the Inorder traversal using threads. PART - C (2 x 20 = 40) Answer any TWO from the following: 16. a) What is meant by time complexity? Explain. [8 marks] b) Explain Circular Queue with an Algorithm. [12 marks] 17.a) Explain Quick sort with an example. [12 marks] b) Explain Linear search with an Algorithm. [ 8 marks] 18. What is a Binary tree? Explain the various traversals with suitable examples and algorithms. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~