0% found this document useful (0 votes)
176 views3 pages

BCSL 33

The document discusses various data structure concepts including: 1. Data structures allow for the logical organization of data through models like linear and nonlinear structures. They must balance representing real-world relationships with efficient processing. 2. Abstract data types define values and operations on those values mathematically. They specify logical properties. 3. Key differences between stacks and arrays include stacks having dynamic sizes while arrays are static, and stacks allowing different data types while arrays contain the same type. 4. Linked lists store data non-contiguously using nodes containing information and next node pointers, allowing flexible sizes and insertion/deletion.

Uploaded by

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

BCSL 33

The document discusses various data structure concepts including: 1. Data structures allow for the logical organization of data through models like linear and nonlinear structures. They must balance representing real-world relationships with efficient processing. 2. Abstract data types define values and operations on those values mathematically. They specify logical properties. 3. Key differences between stacks and arrays include stacks having dynamic sizes while arrays are static, and stacks allowing different data types while arrays contain the same type. 4. Linked lists store data non-contiguously using nodes containing information and next node pointers, allowing flexible sizes and insertion/deletion.

Uploaded by

AAkash
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

TOP DATA STRUCTURES LAB VIVA Questions and Answers

Data Structures VIVA Questions: -


1. What is data structure?
The logical and mathematical model of a particular organization of data is called data structure. There are
two types of data structure
1. Linear
2. Nonlinear

2. What are the goals of Data Structure?


It must rich enough in structure to reflect the actual relationship ofdata in real world.
The structure should be simple enough for efficient processing ofdata.

3. What does abstract Data Type Mean?


Data type is a collection of values and a set of operations on these values. Abstract data type refers to the
mathematical concept that define the data type. It is a useful tool for specifying the logical properties of a
data type. ADT consists of two parts
1.Values definition 2. Operation definition

4. What is the difference between a Stack and an Array?

Stack is an ordered collection of items Stack is a dynamic object whose size is constantly changing
asitems are pushed and popped.
Stack may contain different data types
Stack is declared as a structure containing an array to hold the element of the stack, and an integer
to indicate the current stack top within the array.

ARRAY

Array is an ordered collection of items


Array is a static object i.e. no of item is fixed and is assignedby the declaration of the array
It contains same data types.
Array can be home of a stack i.e. array can be declared large enough for maximum size of the
stack.

5. What is sequential search?


In sequential search each item in the array is compared with the item being searched until a match occurs.
It is applicable to a tableorganized either as an array or as a linked list.

6. What actions are performed when a function is called?


When a function is called
i) arguments are passed
ii) local variables are allocated and initialized
ii) transferring control to the function
7. What actions are performed when a function returns?
i) Return address is retrieved
ii) Function’s data area is freed
iii) Branch is taken to the return address

8. What is a linked list?


A linked list is a linear collection of data elements, called nodes, where the linear order is given by
pointers. Each node has two partsfirst part contain the information of the element second part contains the
address of the next node in the list.

9. What do you mean by free pool?


Pool is a list consisting of unused memory cells which has its ownpointer.

10. What do you mean by garbage collection?


It is a technique in which the operating system periodically collects all the deleted space onto the free
storage list. It takes place when there is minimum amount of space left in storage list or when “CPU” is
ideal. The alternate method to this is to immediately reinsert the space into free storage list which is time
consuming.

16. What is a queue?


A queue is an ordered collection of items from which items may be deleted at one end (front end) and
items inserted at the other end (rear end).It obeys FIFO rule there is no limit to the number of elements a
queue contains.

17. What is a priority queue?


The priority queue is a data structure in which the intrinsic ordering of the elements (numeric or
alphabetic)
Determines the result of its basic operation. It is of two types
i) Ascending priority queue- Here smallest item can be removed(insertion is arbitrary)
ii) Descending priority queue- Here largest item can be removed(insertion is arbitrary)

19. What are the disadvantages of linear list?


i) We cannot reach any of the nodes that precede node (p)
ii) If a list is traversed, the external pointer to the list must be persevered in order to reference the list
again

20. Define circular list?


In linear list the next field of the last node contain a null pointer, when a next field in the last node contain
a pointer back to the firstnode it is called circular list.
Advantages – From any point in the list it is possible to reach at anyother point
21. What are the disadvantages of circular list?
i) We can’t traverse the list backward
ii) If a pointer to a node is given, we cannot delete the node

22. Define double linked list?


It is a collection of data elements called nodes, where each node isdivided into three parts
i) An info field that contains the information stored in the node
ii) Left field that contain pointer to node on left side
iii) Right field that contains pointer to node on right side

23. What is a spanning Tree?


A spanning tree is a tree associated with a network. All the nodes of the graph appear on the tree once. A
minimum spanning tree is a spanning tree organized so that the total edge weight between nodes is
minimized.

You might also like