Computer Science, asked by princessparul7437, 1 year ago

What is called linear and non linear data structure?

Answers

Answered by rakeshchennupati143
1

Answer:

Rather than referring to the topology of the data structure itself, I'd suggest that “linear” and “non-linear” describe how the data are accessed. It may seem like mincing words, but this helps frame why this characteristic matters, and when it changes.

Explanation:

For example, 1-D arrays have Non-linear Insertion if you know the existing length. (Even list-based Queue implementations generally cache the final item, to optimize Insert.)

For most operations though —Find, Update, Remove —the 1-D array exhibits Linear characteristics, so if you must apply a blanket label to the data structure, on balance it is more Linear than anything else.

Similar questions