Skip to content

How would one differentiate between linear and non-linear data structures when it comes to coding in different languages? #1660

Answered by Emojees
Kuefo asked this question in Q&A
Discussion options

You must be logged in to vote

Linear: It is a structure in which data elements are adjacent to each other. Examples of linear data structure include linked lists, arrays, queues, and stacks

Non-Linear: It is a structure in which each data element can connect to two adjacent data elements. Examples of nonlinear data structures include graphs and trees

I hope this helps, it's a brief example, but I think it makes sense.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Kuefo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants