Which of the following data structures stores elements in a non-linear…
2024
Which of the following data structures stores elements in a non-linear relationship?
Answer: E. None of the above — To determine which data structure stores elements in a non-linear relationship, we need to understand the nature of each data structure. A non-linear data…
- A.
Stack
- B.
Queue
- C.
Array
- D.
More than one of the above
- E.
None of the above
Attempted by 2702 students.
Show answer & explanation
Correct answer: E
To determine which data structure stores elements in a non-linear relationship, we need to understand the nature of each data structure. A non-linear data structure does not store elements in a sequential manner. Instead, elements are connected in a hierarchical or networked way, such as in trees or graphs. Let's analyze each option: Stack / स्टैक: A stack stores elements in a linear order, following the LIFO (Last In, First Out) principle. Elements are added and removed from the same end, forming a sequential structure. This makes it a linear data structure. Queue / क्यू: A queue stores elements in a linear order, following the FIFO (First In, First Out) principle. Elements are added at one end and removed from the other, forming a sequential structure. This makes it a linear data structure. Array / ऐरे: An array stores elements in a linear sequence, indexed by position. Elements are accessed using indices, forming a one-dimensional or multi-dimensional linear arrangement. This makes it a linear data structure. More than one of the above / उपरोक्त में से एक से अधिक: This option suggests that more than one of the listed structures are non-linear. However, stack, queue, and array are all linear data structures. Therefore, this option is incorrect. None of the above / उपरोक्त में से कोई नहीं: This option states that none of the listed structures are non-linear. Since stack, queue, and array are all linear, this option is correct. Therefore, the correct answer is 'None of the above' because none of the listed data structures are non-linear.