example of linear and non-linear data structures?

Answer Posted / sneha rajput

A data structure is classified into two categories: Linear and Non-Linear data structures. A data structure is said to be linear if the elements form a sequence, for example Array, Linked list, queue etc. Elements in a nonlinear data structure do not form a sequence, for example Tree, Hash tree, Binary tree, etc.

There are two ways of representing linear data structures in memory. One way is to have the linear relationship between the elements by means of sequential memory locations. Such linear structures are called arrays. The other way is to have the linear relationship between the elements represented by means of links. Such linear data structures are called linked list.

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are linked list?

558


What is difference between while and do while?

467


Given an unsorted linked list, and without using a temporary buffer, write a method that will delete any duplicates from the linked list?

644


What is different between array and list?

495


Why is null not allowed in concurrenthashmap?

465






Explain the steps to insert data into a singly linked list?

475


What are the disadvantages of linked list?

461


Can arraylist contain duplicates?

498


Write the importance of hashing?

605


How does hashset maintain order?

524


Differentiate between arraylist and linkedlist.

625


Is duplicate allowed in hashmap?

632


Are data structures important?

485


Why we use arraylist instead of linked list?

473


How does quick sort work?

523