answersLogoWhite

0

Is Array a linear data structure?

Updated: 10/25/2022
User Avatar

Wiki User

12y ago

Best Answer

Conceptually, an array is a fixed size collection. However, a "ragged" array is not a linear one, nor a "matrix".

Those 2 maybe thought of an array of arrays, ragged ones are arrays with different lengths, while matrices are arrays of the same length.

Depends on the context of the question, an array is linear itself, regardless what kind of elements it contains. But there exists some arrays (I used math term on purposes) that are not "linear" (the ragged, the matrix, the 3-dimensional, 4-, etc.), thus, NOT all Arrays are Linear.

User Avatar

Wiki User

12y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

11y ago

A data structure is simple a structure that you define.

A linear data structure simply means that the data structure is all in the same contiguous blocks of memory.

And array of characters is represented by one character after another.

In C/C++ an array of characters would look like this:

char my_array[50];

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Is Array a linear data structure?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What is linear data structure?

when elements are accesed or placed in contiguous memory location yhen data structure is known as linear data structure. stacks, arrays, queues and linklists are example of data structure. in non-linear data structure element are not placed in sequential manner. trees, graph are the ex. of non-linear data structure.


What is a complex data structure?

A complex data structure is the kind of structure that has two arrays. One array hols the real part of the complex data and the other array holds the imaginary part.


What was the first historical data structure?

Array


What is Linear and non linear list in data structure?

Linear : Traversal is linear .. ex: array,linked lists,stacks,queues NoN-linear: Traversal is not linear.. ex:trees,graphs imagine the situation of searching of particular element..in above scenarious..then u will understand easily.. Linear : Traversal is linear .. ex: array,linked lists,stacks,queues NoN-linear: Traversal is not linear.. ex:trees,graphs imagine the situation of searching of particular element..in above scenarious..then u will understand easily.. Linear : Traversal is linear .. ex: array,linked lists,stacks,queues NoN-linear: Traversal is not linear.. ex:trees,graphs imagine the situation of searching of particular element..in above scenarious..then u will understand easily..


Difference between linear n nonlinear data structures?

A data structure is linear if every item is related (or attatched) to its previous and next item(e.g.array, linked list) and it is non-linear if every item is attached to many other items in specific ways to reflect relationships(e.g, n-ary tree). In linear data structure data items are arranged in a linear sequence. In non-linear data structure data items are not in a sequence. A different Opinion (learnt while watching a video on Data Structures) is that Linear data structures are the Data structures implemented using arrays (with consecutive data allocation for each member of the array) while Non Linear Data Structure refers to an implementation in terms of use of pointers (such as a linked list). --Research Reqd.--

Related questions

What is linear data structure?

when elements are accesed or placed in contiguous memory location yhen data structure is known as linear data structure. stacks, arrays, queues and linklists are example of data structure. in non-linear data structure element are not placed in sequential manner. trees, graph are the ex. of non-linear data structure.


What do an array and a stack have in common?

Both are linear data structures.


Quick sort is faster in data structure?

I think the data structure in question is array.


What is a complex data structure?

A complex data structure is the kind of structure that has two arrays. One array hols the real part of the complex data and the other array holds the imaginary part.


What is the difference between an array and structure?

An array is a collection of related data elements of same type.Structure can have elements of different types.An array is a derived data type.A structure is a programmer-defined data type.A struct can contain multiple data types, whereas an array can not.


What was the first historical data structure?

Array


How 2 write c code of array data structure?

An example: int array [10]; yaaa this is write but for a simple programs on array and all data structure visit codingdatastructure.blogspot.com


What is Linear and non linear list in data structure?

Linear : Traversal is linear .. ex: array,linked lists,stacks,queues NoN-linear: Traversal is not linear.. ex:trees,graphs imagine the situation of searching of particular element..in above scenarious..then u will understand easily.. Linear : Traversal is linear .. ex: array,linked lists,stacks,queues NoN-linear: Traversal is not linear.. ex:trees,graphs imagine the situation of searching of particular element..in above scenarious..then u will understand easily.. Linear : Traversal is linear .. ex: array,linked lists,stacks,queues NoN-linear: Traversal is not linear.. ex:trees,graphs imagine the situation of searching of particular element..in above scenarious..then u will understand easily..


What is non linear data strcuture?

A tree is an example for a non-linear data structure.


Difference between linear n nonlinear data structures?

A data structure is linear if every item is related (or attatched) to its previous and next item(e.g.array, linked list) and it is non-linear if every item is attached to many other items in specific ways to reflect relationships(e.g, n-ary tree). In linear data structure data items are arranged in a linear sequence. In non-linear data structure data items are not in a sequence. A different Opinion (learnt while watching a video on Data Structures) is that Linear data structures are the Data structures implemented using arrays (with consecutive data allocation for each member of the array) while Non Linear Data Structure refers to an implementation in terms of use of pointers (such as a linked list). --Research Reqd.--


What are the uses of array?

Array in most programming langauges like C ,C++, Java etc is a static , homogeneous and linear data structure. A data structure itself is a mathematical and logical model to organise data.It clearly specifies the domain of the data that can be stored in the structure and the collection of valid operations (functions) that can be performed on that data. Array is a linear structure in the sense that the data is organised sequentially(one after another in a contineous chunck of memory). It is a homogeneous data structure i.e. it contains elements which are of the same data type.The data type of array can be inbuilt like int , float ,char, double and even user defined that is created using a structure or a class. The main use of an array is to oragnise homogeneous data together as a group to perform operations on data in a collective manner since traversal and retrieval becomes easy.Whenever a homogeneous list(One Dimendional or Multi-Dimensional)has to be implemented we make use of array.The advantage of array lies in the fact that it uses indexed represenattion enabling us to access any member element directly. The example of practical use of array in progarmming will be creation of index lists, pointer arrays,matrix operations(transpose,addition ,subtraction,multiplication,inverse etc.).


What data structure is used to store homogeneous data item?

array