The logical or mathematical model of a particular organisation of data is called data structure. It is the representation of the logical relationship existing between individual elements of the data.
In other words data structure is collection of data elements whose organisation is characterized by accessing operations that are used to store and retrieve the individual data elements.
A data structure mainly specifies the following things:-
i> Organisation of data.
ii> Accessing methods.
iii> degree of associativity.
iv> Processing alternative code for information.
* Data structure is the basic building blocks of the program.
* |The data structure is of two types:-
1. Primitive data structure.
2. Non-Primitive data structure.
1. Primitive data structure:-
These are the basic data structures and they are directly operated by a machine instructions.
In general they have different representations for different computers. It is also known as built-in-data structure. Ex- integer , character , float , pointer.
2. Non-Primitive data structure:-
They are derived from the primitive data structure. The non-primitive data structures emphasized on a grouping of homogeneous or hectogeneous data items. It is also known as user-defined data structure. Ex- array , list , files.
*Lists are further categorised into two categorises :-
A. Linear
B. Non -Linear
* Integer:- Integers are a commonly used data type in computer programming.When two integers are added, substracted or multiplied , the result is also an integer. An integer is a whole number that can be positive , negative or zero. It takes 2 byte space in memory.
* Float:- It is used in programming language to define a variable with a factorial value.Numbers created using a float variable declaration will have digits on both sides of a decimal point. It takes 4 byte space in memory.
* character:- A single character can be defined as character type data. Characters are usually stored in 1 byte of internal storage.
* Pointer:- Pointer is data type which denotes the address of another variable. To declare a pointer variable we have to use data type and an indirection operator (*) before the variable name.
* Array:- An array is a variable, which has several pockets and each pockets can contains similar data type. This is the simplest type of data structure. By a linear array we mean a list of finite number 'n' of similar data elements referenced respectively by a set of n numbers usually 1,2,3,.........n.
* List:- A list or is an abstract data type that represents a countable number of ordered values, where the same value may occur more than once. An instance of a list is a computer representation of the mathematical concept of a finite sequence.
* Files:- A file contains data which are stored permanently in a storage device. A file stored in a storage device is always identifying using a file name.Files are further in to two types on the basis of data stored :-
a. Data files.
b. Text files.
* Stack:- A stack is a non-primitive linear data structure. It is an ordered list where the
addition of new data elements and deletion of existing data element is done by only one end called Top of the stack.
It is the last-in-first-out or first-in-last-out type of list.
The insertion or addition of data elements into the stack is called push operation and deletion of the existing data element is called pop operation.
* Queue:- A queue is also non-primitive linear data structure. It is the first -in-first-out system of list. In queue deletion can take place at one end of the list , the Front of the list.And insertion can take place only at the other end of the list , Rear of the list.
* Graph:- A graph data structure consists of a finite set of vertices or nodes or points, together with a set of unordered pairs of these vertices for an undirected graph or a set of ordered pairs for a directed graph. Data sometime contain a relationship between pair of elements which is not necessary hierarchical in nature.
* Tree:- Data frequently contains a hierarchical relationship between various elements . The data structure which reflects this relationship is called a rooted tree graph or simply a tree.
Read , share and comment 😄
In other words data structure is collection of data elements whose organisation is characterized by accessing operations that are used to store and retrieve the individual data elements.
A data structure mainly specifies the following things:-
i> Organisation of data.
ii> Accessing methods.
iii> degree of associativity.
iv> Processing alternative code for information.
* Data structure is the basic building blocks of the program.
* |The data structure is of two types:-
1. Primitive data structure.
2. Non-Primitive data structure.
1. Primitive data structure:-
These are the basic data structures and they are directly operated by a machine instructions.
In general they have different representations for different computers. It is also known as built-in-data structure. Ex- integer , character , float , pointer.
2. Non-Primitive data structure:-
They are derived from the primitive data structure. The non-primitive data structures emphasized on a grouping of homogeneous or hectogeneous data items. It is also known as user-defined data structure. Ex- array , list , files.
*Lists are further categorised into two categorises :-
A. Linear
B. Non -Linear
* Integer:- Integers are a commonly used data type in computer programming.When two integers are added, substracted or multiplied , the result is also an integer. An integer is a whole number that can be positive , negative or zero. It takes 2 byte space in memory.
* Float:- It is used in programming language to define a variable with a factorial value.Numbers created using a float variable declaration will have digits on both sides of a decimal point. It takes 4 byte space in memory.
* character:- A single character can be defined as character type data. Characters are usually stored in 1 byte of internal storage.
* Pointer:- Pointer is data type which denotes the address of another variable. To declare a pointer variable we have to use data type and an indirection operator (*) before the variable name.
* Array:- An array is a variable, which has several pockets and each pockets can contains similar data type. This is the simplest type of data structure. By a linear array we mean a list of finite number 'n' of similar data elements referenced respectively by a set of n numbers usually 1,2,3,.........n.
* List:- A list or is an abstract data type that represents a countable number of ordered values, where the same value may occur more than once. An instance of a list is a computer representation of the mathematical concept of a finite sequence.
* Files:- A file contains data which are stored permanently in a storage device. A file stored in a storage device is always identifying using a file name.Files are further in to two types on the basis of data stored :-
a. Data files.
b. Text files.
* Stack:- A stack is a non-primitive linear data structure. It is an ordered list where the
addition of new data elements and deletion of existing data element is done by only one end called Top of the stack.
It is the last-in-first-out or first-in-last-out type of list.
The insertion or addition of data elements into the stack is called push operation and deletion of the existing data element is called pop operation.
* Queue:- A queue is also non-primitive linear data structure. It is the first -in-first-out system of list. In queue deletion can take place at one end of the list , the Front of the list.And insertion can take place only at the other end of the list , Rear of the list.
* Graph:- A graph data structure consists of a finite set of vertices or nodes or points, together with a set of unordered pairs of these vertices for an undirected graph or a set of ordered pairs for a directed graph. Data sometime contain a relationship between pair of elements which is not necessary hierarchical in nature.
* Tree:- Data frequently contains a hierarchical relationship between various elements . The data structure which reflects this relationship is called a rooted tree graph or simply a tree.
Read , share and comment 😄
👍👍👍👍👍👍👍
ReplyDeleteSimply understanding concept
ReplyDelete