0% found this document useful (0 votes)
148 views6 pages

NEP - Data Structure - 29 May2024

This document is a question paper for a Data Structure course, containing instructions and sections for students to answer. It includes various questions related to abstract data types, binary search trees, linked lists, and algorithms, along with coding tasks in C++. The paper is structured into compulsory and optional sections, with a total of 90 marks available for assessment.

Uploaded by

shanmugam3102005
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
148 views6 pages

NEP - Data Structure - 29 May2024

This document is a question paper for a Data Structure course, containing instructions and sections for students to answer. It includes various questions related to abstract data types, binary search trees, linked lists, and algorithms, along with coding tasks in C++. The paper is structured into compulsory and optional sections, with a total of 90 marks available for assessment.

Uploaded by

shanmugam3102005
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 6
24-05-2904 B.S. PS) [This question paper contains 8 printed pages.] Your Roll No. Sr. No. of Question Paper : 4008 H Unique Paper Code : 2342571201 Name of the Paper : Data Structure Name of the Course : B.Sc. (Programme) and B.A. (Programme) Semester cyl Duration : 3 Hours Maximum Marks : 90 Instructions for Candidates 1. Write your Roll No. on the top immediately on receipt of this question paper. 2. Section A is compulsory. 3. Answer any four questions from Section B. 4. All parts of Question must be attempted together. P.T.O. Scanned with CamScanner an 4008 2 SECTION A 1. (a) Explain any two Abstract Data Types in Cy (3) (0) What will be the output of the following operation 8 on an empty Stack. () Push(3),Push(4),Pop(),Push(5),Push(6),Pop() (c) Write C++ code to add an element into a Queue, @ | (4) Define Deque and explain any two operations that can be performed on it. @) (e) Write C++ code to read and write an array of n- dimension. @) (£) Differentiate between the following with a suitable example : (i) BPS and DFS tree traversal Scanned with CamScanner 2 4008 SECTION A mata Types in CH. jo Abstract Di Explain any @ 1 @ lowing operations What will be the outpat of the foll @) © con an empty Stack push(3),Push(4),Pop(),Push(5),Push(6),PoPO Queue. @) (¢) Write C++ code to add an element into @ () Define Deque and explain any two operations that @) cean be performed on it an array of B- 8 (€) Write C+ code to read and wi dimension. ( Differentiate between the following with a suitable example: () BPS and DFS tree traversal 4008 3 (i) Complete and Perfect Binary tree (6) (8) Define Height Balanced trees with a suitable example, pl @ (h) How to convert a singly tink list into a circular link list? Explain. @ © What do you mean by asymptotic Big-O analysis of an algorithm? @) SECTION B Consider the following BST as ) P.T.o, Scanned with CamScanner 4 4008 shi operations *= aw the status of BST after exch ofthe following Gp praw the updated tree after 2 will be inserted in the BST. (iy Draw the updated tree after deleting 3 from the BST. Giy Weite postorder traversal of the resultant BST. (jv) Check if the resultant tree 1s height palanced or not? Justify your answer (v) Write pre-order traversal of the Final resultant tree. suitable © 3, (a) Explain Master's theorem with the helP of example. 4, 4008 5 (b) Write a program in C++ to find a ibonacei Series using recursive function. 6 (©) Write @ program in C++ to find factorial of a “ umber ‘n" (a) Write a program in C++ to implement stack using Linked List. 6 (b) Draw a tree whose in-order and post-post traversals are given below : © In-order: BFEADGC Post-order: FEBGDCA. (©) Evaluate the Cost of the given function:~ (4) T(n)=77(n/6) + n? P.T.O. Scanned with CamScanner 4008 6 5. (a) Differentiate betwee! 1n Singly and Doubly Iist, Also, write a program in CHF (0 insert an ily linked list. ment in the beginning of a sin © lete a node from the end of (&) Write C++ code #0 () ‘a singly linked list and disadvantages “@ fention any two advantages (Me of Linked list. 6. (@) Create a BST with the following values {7,51 8,3:60.9,4,2} if the numbers are inserted in .n initially empty BST. ©) the order as given into # ‘Also, write its in- order traversal. (b) Draw a Recursion tree for the recurrence Tin) = (2) + ont, (5) 4008 / (©) Write any two rea real-life applicatio and queue. 8 ACh of sack O) 7. (a) Consider the following seq equen ice of perations performed on an initia 'Y empty d loubly tink inked : © InsertBeginning(12), + InsertBeginning(4), + InsertEnd(3), * InsertEnd(1), + DeleteBeginning(), + Deletenode(!) Show the the contents of the list, links between th nodes, a1 ind head and tail after each operation, (b) Perf form and explain count sort on the array {5,5,7.6,7,4,3} ©) P.T.O. Scanned with CamScanner 8 4008 (c) Mention any two properties of a Binary Heap, (4) ) RN oF (1500) Scanned with CamScanner

You might also like