Reference no: EM13338938
1. a) What are the characteristics of an algorithm? Describe with an example.
b) Write an algorithm to implement any three operations of a queue.
2. a) Describe the two methods of representing a graph.
b) Design an algorithm to generate all prime numbers between 10 and 20.
3. a) Trace out the algorithm Max Min on a data set containing atleast 8 elements.
b) Design an algorithm to sort the elements using merge sort.
4. What are preorder, Inorder, postorder traversals of a binary tree? Design recursion algorithms to implement them and explain with the help of an example.
5. a) What is binary search? Develop a recursive algorithm for binary search.
b) What are the two methods of representing a binary tree?
6. a) Design an algorithm to check whether a given string is a palindrome or not.
b) Trace out the algorithm quick sort on the data set {1,5,7,19,15,8,9, 10}.
7. a) What is validation and testing of algorithms?
b) Explain the terms with examples
i) Finite graph
ii) Isolated and pendent vertices
iii) NULL graph
iv) Path.
8. Write short notes on :
a) Debugging
b) The need for recursion
c) Incidence matrix.