MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

DATA STRUCTURES

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Which data structure is a non-linear data structure?
A
Stack
B
Graphs
C
Linked list
D
Queue
Explanation: 

Detailed explanation-1: -A graph is a non-linear kind of data structure made up of nodes or vertices and edges. The edges connect any two nodes in the graph, and the nodes are also known as vertices.

Detailed explanation-2: -What Is a Non-Linear Data Structure? It is a form of data structure where the data elements don’t stay arranged linearly or sequentially. Since the data structure is non-linear, it does not involve a single level. Therefore, a user can’t traverse all of its elements in a single run.

Detailed explanation-3: -The types of structures following non-linearity are Trees and Graphs. A tree data structure consists of various nodes linked together.

There is 1 question to complete.