What are the Differences Between Linear and Non-linear Data Structure

BASIS FOR COMPARISONLINEAR DATA STRUCTURENON-LINEAR DATA STRUCTURE
BasicThe data is organized in a linear order in which elements are linked one after the otherthe non-linear data structure the data elements are not stored in a sequential manner rather the elements are hierarchically related
Traversing of the dataSequential - The data elements can be accessed in one time (single run).Traversing of data elements in one go is not possible.
Ease of implementationSimplerComplex
Levels involvedSingle levelMultiple level
ExamplesArray, queue, stack, linked list, etc.Tree and graph.
Memory utilizationIneffectiveEffective

Comments

Popular posts from this blog

What is Graph