munotes®
Data Structure, solved papers

Dec 2025

Paper 2 of 3 14 questions answered 60 marks 2 hours

munotes.in i
munotes.in ii

The Paper as Set

The questions in this volume are the questions asked at the Dec 2025 examination, reproduced as the University of Mumbai set them, in the order it set them. Nothing has been reworded, added or left out. Only the answers are ours. See the original question paper.

Duration 2 hours  ·  Total marks 60  ·  14 questions answered

How to use this volume

Solve the paper first, under exam conditions and against the clock. Then read the answers here and mark your own. Reading a solution before attempting the question feels productive and teaches very little, because recognising an answer is not the same as being able to write one.

munotes.in iii

1

Q.1

Attempt any THREE · 15 Marks

munotes.in 1

aExplain ADT. List the linear and non-linear data structures with examples.[5]

Answer

For full marks, cover: what an abstract data type is and why it is "abstract", one ADT written out with its values and operations, the list of linear data structures with an example of each, the list of non-linear ones with an example of each, and the one-line test that tells them apart.

Abstract data type (ADT)

An abstract data type is a description of a kind of data by two things only: the values it can hold and the operations that may be done on it. It says what each operation does. It does not say how the data is laid out in memory or how the operations are coded. That hidden part is the implementation.

The word "abstract" means the user of the type works only through its operations. A program that uses a stack ADT calls push and pop; whether the stack lives in an array or in a linked list does not change that program at all.

Example: the Stack ADT

munotes.in 2
  1. Values: a finite ordered sequence of elements, with one end called the top.
  2. create(): makes an empty stack.
  3. push(S, x): puts x on the top of S.
  4. pop(S): removes and returns the top element; an error (underflow) if S is empty.
  5. peek(S): returns the top element without removing it.
  6. isEmpty(S): true when S holds no element.

Linear data structures

The elements sit one after another in a single line, and each element has at most one element before it and one after it.

StructureExample of use
Arraymarks of 60 students in int marks[60]
Linked lista music playlist where songs are added and removed often
Stackthe undo history of a text editor
Queueprint jobs waiting for one printer
munotes.in 3

Non-linear data structures

An element can be joined to several others, so the elements do not form one line.

StructureExample of use
Treefolders and files on a disk, an expression tree
Grapha road map, where cities are vertices and roads are edges
Heap (a special tree)a priority queue of patients by urgency

The test: if every element can be reached in one straight pass from the first element, the structure is linear; if an element can branch to more than one next element, it is non-linear.

Conclusion. An ADT fixes the values and operations of a data type and hides its implementation, as the Stack ADT shows. Arrays, linked lists, stacks and queues are linear; trees, graphs and heaps are non-linear.

munotes.in 4

The rest of the answers

You have read the paper as it was set and its first answer in full.

Every other answer, in every solved paper of this semester, opens with the solved papers.

Issue

Found an error in this volume? Report it and we will check it against the paper.

Up next · Paper 3 of 3 May 2025 Data Structure Next paper

Tip: use the left and right arrow keys to turn papers.