22317 S23 Past Paper PDF

Summary

This is a past paper containing data structure and algorithm questions, suitable for a secondary school curriculum. The paper includes various kinds of questions, such as sorting, linked lists, and trees, designed to test a student's understanding of fundamental data structures and algorithms.

Full Transcript

22232 22317 3 Hours / 70 Marks Seat No. Instructions : (1) All Questions are compulsory. (2) Illustrate your answers with neat sketches wherever necessary....

22232 22317 3 Hours / 70 Marks Seat No. Instructions : (1) All Questions are compulsory. (2) Illustrate your answers with neat sketches wherever necessary. (3) Figures to the right indicate full marks. (4) Assume suitable data, if necessary. Marks 1. Attempt any FIVE of the following : 10 (a) Write any four operations performed on data structure. (b) Draw the diagram of Linear Queue to represent front and rear pointers. (c) State the following terms : (i) Leaf node of a tree (ii) Degree of a tree (d) Write any two operations performed on the stack. (e) What are directed and undirected graphs ? (f) Explain linear and non-linear data structures. (g) Define Searching. What are its types ? 2. Attempt any THREE of the following : 12 (a) Sort the following elements using Radix Sort Method : {361, 12, 527, 143, 9, 768, 3481}. (b) Write an algorithm to delete a node at the beginning from a singly Linked List. (c) Explain stack overflow and underflow conditions with example. (d) Implement a C program to insert an element in an array. [1 of 4] P.T.O. www.truexams.com 22317 [2 of 4] 3. Attempt any THREE of the following : 12 (a) Differentiate between tree and graph with respect to any four parameters. (b) Write an algorithm to delete an intermediate node in a singly linked list. (c) Sort the following numbers in ascending order using Insertion sort : {25, 15, 4, 103, 62, 9} and write the output after each iteration. (d) Construct the Binary Search Tree using following elements : {35, 15, 40, 7, 10, 100, 28, 82, 53, 25, 3}. Show diagrammatically each step of construction of BST. 4. Attempt any THREE of the following : 12 (a) Differentiate between Binary search and Linear search with respect to any four parameters. (b) Create a singly Linked List using data fields 10, 20, 30, 40, 50 and show procedure step-by-step with the help of diagram from start to end. (c) Show the effect of PUSH and POP operation on to the stack of size 10. The stack contains 10, 20, 30, 40, 50 and 60, with 60 being at top of the stack. Show diagrammatically the effect of – (i) PUSH 55 (ii) PUSH 70 (iii) POP (iv) POP Sketch the final structure of stack after performing the above said operations. (d) For the following directed graph : (i) Give adjacency matrix representation. (ii) Give adjacency list representation www.truexams.com 22317 [3 of 4] 5. Attempt any TWO of the following : 12 (a) Convert the infix expression to its postfix expression using stack ((A + B) * D) ^ (E – F). Show diagrammatically each step of conversion. (b) Show the effect of INSERT and DELETE operations onto the linear queue of size 10. The linear queue sequentially contains 10,20, 30, 40 and 50 where 10 is at front of the queue. Show diagrammatically the effect of – (i) INSERT (75) (ii) INSERT (85) (iii) DELETE (iv) INSERT (60) (v) DELETE (vi) INSERT (90) (c) From the given tree, complete the following answers : (i) Degree of tree : _________ (ii) Degree of node B : ________ (iii) Level of node H : ________ (iv) Indegree of node C : _________ (v) Outdegree of node B : _________ (vi) Height of the tree : _________ P.T.O. www.truexams.com 22317 [4 of 4] 6. Attempt any TWO of the following : 12 (a) Find the position of element 29 using Binary search method in an array given as : {11, 5, 21, 3, 29, 17, 2, 43}. (b) Evaluate the following postfix expression : 4 6 24 + * 6 3 / – Show diagrammatically each step of evaluation using stack. (c) Create a singly linked list using data fields 10, 20, 30, 40, 50. Search a node 40 from the singly linked list and show procedure step-by-step with the help of the diagram from start to end. _______________ www.truexams.com

Use Quizgecko on...
Browser
Browser