What is Linear and Non-Linear Data Structure

Errorlogger
0
Array:- An array is an arrangement of data arranged in a systematic order. An array usually has rows and columns. Each element of an array is accessed using the row and column id.
Array operations:-

  • Initializing an array:- Specifies the array size. Example: Arr[10];
  • Assigning :- This operation assigns a value to an array. Example: arr[1]=5; 

Data Structure can be classified into two different category.
  1. Linear Data  Structure 
  2. Non-Linear Data Structure

1) Linear data structure: 

A linear data structure traverses the data elements sequentially, in which only one data element can directly be reached. Ex: Arrays, Linked Lists 

2) Non-Linear data structure: 

Every data item is attached to several other data items in a way that is specific for reflecting relationships. The data items are not arranged in a sequential structure. Ex: Trees, Graphs

Post a Comment

0Comments

Post a Comment (0)

#buttons=(Accept !) #days=(30)

Our website uses cookies to enhance your experience. Check Now
Accept !