1.

Which of the following is an example for non linear data type?(a) Tree(b) Array(c) Linked list(d) QueueThis question was posed to me in an online interview.This is a very interesting question from Static vs Dynamic Memory Allocation in division Dynamic Memory Allocation in C of C

Answer»

Correct option is (a) Tree

For explanation: A data structure is SAID to be linear if its elements form a sequence or a linear LIST. For example array, linked list, queue, STACK ETC. Elements in a non linear data structure do not form a sequence. For example Trees, graphs etc.



Discussion

No Comment Found

Related InterviewSolutions