Data structure
The data structure is a set of tools that preserves data, relationships/functions for suitable representation.
The notion of the data structure as a system with three-component (D: Domain, F: Functions and A: Axiom) is also called an abstract data type, which is in the current literature also called a class.
Smallest/primitive/atomic/fundamental storage structure is the flip flop.
Classification of data structure
The data structure is broadly classified into a primitive data structure and a non-primitive data structure.
Primitive data structure
These are atomic in nature, hence further division is not possible. A data structure is said to be primitive if it could be operated upon directly without requiring partition of it by a machine-level instruction.
Ex: integer, float, ASCII character, double, natural number, real number, boolean, address (pointers).
Non-primitive data structures
These are non-atomic, composite in nature and further division is possible. Non-primitive data structures are further classified into linear data structures and non-linear data structures.
Ex: M.Tech program, set, classroom, array, stack, etc,.
Linear data structure
A data structure is said to be linear if it’s elements can be placed in one-to-one correspondence with a set of natural numbers uniquely.
In other words, the questions such as, what is first in the sequence, second, third,…, last in sequence can be deterministically answerable.
Ex: alphabets in any language (ASCII), all letters in the name of a person, array, stack, a vector of ‘n’ elements, etc,.
Non-linear data structure
A data structure is said to be non-linear if its elements can’t be placed in one-to-one correspondence with a set of natural numbers uniquely.
In other words, the questions such as, what is first in the sequence, second, third,…, last in the sequence are not necessarily, deterministically answerable.
Ex: A collection of boys with their relationships, a football team, all cities in Canada with their road connectivity, algorithm flow control, graph, trees.