You are on page 1of 2
'be treated as malpractice, 50, luator and /or equations written eg, 42+8 Important Note: 1. On completing your ans Dkompulsoriy draw diagonal eb lines on te emainin, Dank pages, 2 Any revealing ofidndsealen, appeal oo 18CS32 vs [ TT TTT a, Define Data Structures. Explaimthe,various operations on Dats (06 Marks) D. Define Structures. Explain the,types of structures with examples for each. (07 Marks) ¢. List and explain the functions Stipported in C for Dynamic Memory Allocation. (07 Marks) és Ga? OR Sy al 2 a. Define Pattern Matchifig. Write the Knuth Mortis Pratt Pattern matching/algorithm and apply the same soistareh the pattern ‘abedabey”‘in the text ‘abexabedabxabedabcy” Re y (10 Marks) b. Write the Fast Jranspose algorithm to transpose the given Sparse Matrix, Express the given Sparse Matrix triplets and find its transpose, Zo 0 23 0 0 A= (10 Marks) - 42-0 0 0 oan, 3 a, Define Stacks, Listjand explain the various operations on stacks using arrays with stack overflowand stack underflow conditions A (10 Marks) by Write, dp “algorithm to conver infix expressioi. t6 postfix expression and also trace the same {Oi the expression (ab) d+ elf +c. (40 Marks) ° an OR. 4 fine Recursion. Explain the types of féciirsion. Write the recursive function for 1) Factorial of {fumber ii) Tower of Hanoi. (10 Marks) b. Give the Ackermatin function analy the same to evaluate A(1, 2) (04 Marks) c Circular queues using arrays. (06 Marks) us,” Module-3 5 a. Give the node structure ofteréate a single linked list of integers and write the functions to perform the following Opayations : i) Create a list containing three nodes with data 10, 20, 30 using front insertion. ii) Insert a node,with data 40 at the end of list ili) Delete a node whose data is 30. iv) Display the Tist contents. (10 Marks) b. Write the funétions for : i) Finding the length of the list ii) Concatenate two lists ili) Re Se a list. (10 Marks) vy 1of2 6 a. b, ©, Ta b. c _8 a b, 9 a, bd, ce 10 a, b. ©, 18CS32 OR Write the node representation for the linked représ@htation of a polynomial. Explain the algorithm to add two polynomials represented as linked list (08 Marks) For the given Sparse matrix, write the diagrammalie inked list representation > ou co eo oo (04 Marks) = 2 ° List out the differences between’sitgle linked list and dodblé linked list. Write the functions to perform following operations‘on double linked list : > i) Insert a node at reat'end of the list ii) Delete a note at rear end of the list iii) Search anode with'a.given key value. (08 Marks) Ae Module- Define a Tree. With suitable example expldiny i) Binary tree) ii) Complete binary tree(_) iii) Striet binary tree iv) Skewed:binary tree. (10 Marks) Write the routines to traverse the given free using i) Pre~ Order traversal ii) , Post — Order travers: (06 Marks) Write the recursive search algorihin fora Binary S — (04 Marks) ¢ oR Draw a Binary tree for the following owe, + (3-2) #5) 43 Traverse the above generated tree using Pre =,6rder and Post ~“oider and also write their respective functions. , ‘ e (10 Marks) Write the routines:fr’: a> i) Copying of binary trees ii) Testing equality of bing y trees, (10 Marks) eb . + “Module-5 Define Graphs. Give the Adjacency matrix an¢yAdjacency list representation for the following graph in Fig. Q9(a). (08 Marks) a Fig. Q9(a). Write the algorithm for followiiiGraph Traversal methods : i) Breadth first search + il) Depth first search. (08 Marks) Write an algorithm for inseition sort (04 Marks) OR Define Hashing, Explain any three Hash functions. (08 Marks) Explain Static and:Dynamic bashing in detail, (08 Marks) Define the term File Organization. Explain indexed sequential File Organization. (04 Marks) % tees . & 2of2

You might also like