Sign in to follow this  
Followers 0
asha91

Is a double linked list a nonlinear or linear data structure?

2 posts in this topic

Posted (edited)

A linear data structure gradually traverses the data elements, with just one data element immediately accessible. Examples include arrays and linked lists.

However, This article(https://www.scaler.com/topics/non-linear-data-structure/) on the internet suggested that in a doubly linked list, there is no contiguous memory structure. All the elements of a LinkedList are spread across the memory in a Non-Linear fashion. We may access two data pieces by utilizing the previous and next pointers.

So, is the doubly linked list a nonlinear data structure?

Edited by asha91
0

Share this post


Link to post
Share on other sites
4 hours ago, asha91 said:

A linear data structure gradually traverses the data elements, with just one data element immediately accessible. Examples include arrays and linked lists.

However, in a doubly linked list, we may access two data pieces by utilizing the previous and next pointers.

So, is the doubly linked list a nonlinear data structure?

It is still linear. The important factor is the degree to which you can do that in paralell. The time to walk the list increases lineraly with the number of members.

2

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.