Data Structure


 Data Structure
1.   A data structure is an arrangement of data in a computer's  memory or even disk storage.
2. The logical and mathematical  model of a particular organization of data is called data structure.
3. A data structure is a particular way of storing and organizing of data is called data  structure.

Defination:-

                     A data Structure is a way to represent the relationship among different available  data items apearing in a group and along with set of operation which can be performed on that group so we can say.

                              

                                      Data structure = Related data + Allowed operation


Frequency operations include storage, searching, insertion, deletion and sorting.

  An Example of several common data structures:

  • Arrays
  • Linked List
  • Stacks
  • Queues
  • Trees and Graph

1.  Array:-
                Array a kind of data structure that can store a fixed size sequential collection of element of the same  type. An array is used to store a collection of data, but it is often more useful to think of an array as collection of variables  of the same type.
All array consist of contiguous memory location. The Lowest address corresponding  to the first element and the highest address to the element.

Two type of array are;-
1. Linear Array
2. Non-Linear Array

1. Linear Array:-
                            A linear array is a list of a finite number n of homogenous data element (i.e data element of the some type) such that:

  • The element of the array are refrenced respectively by on index set consisting of n consecutive number.
  • The element of the array are Stored respectively in successive memory location.




The element of an array A may be denoted by subscript notation.

  • A1,A2,A3,.................,An
                      (OR)

  • A(1),A(2),A(3),...................A(n)
                      (OR)

  • A[1],A[2]A[3],....................A[N]

A list of finite number n of similar data elements referenced respectively by a set of n consecutive numbers, usually 1, 2, 3,…..n. That is a specific element is accessed by an index.

Two dimensional array:-
                                            Two dimensional array is a collection of similar data elements where each element is referenced by two subscripts.

  •  Such arrays are called matrices in mathematics and tables in business applications.
 2.  Multidimensional arrays are defined analogously.

Array Data Structure:-
       
It can hold multiple values of a single type.

Elements are referenced by the array name and an ordinal index.
Each element is a value
Indexing begins at zero.
The array forms a contiguous list in memory.
The name of the array holds the address of the first array element.

We specify the array size at compile time, often with a named constant. 


Data Structure Linked list:-
                                              A linked list, or one way list, is a linear collection of data elements, called nodes, where the linear order is given by means of pointers.
         Dynamically allocate space for each element as needed.
Definition:-
                   Linked List is a data Structure which is linear of elements called nodes. A nodes consists of data (one record) and an address (pointer) where next data is Stored.


Type of linked List are:-

  • Single Linked List
  • Doubly Linked List
  • Doubly Circular Linked List
  • Single Circular Linked List
  • Single Circular Linked List
  • circular Linked List
1. Single  Linked List:-
                                                         Single Linked List is variation of linked list in which navigation is possible in one way. each node contain two part one is Info and onother is link. Info contain a data and link contain pointer address of next node Insertion and deletion is possible from one end. linked use less base because only one pointer  for each node.


2. Doubly Linked List:-
                                                          Doubly Linked list is a variation of linked list in which  navigation is possible in both way, either forward and backword easily as compared to single linked list.  Following are important terms to understand the concept of doubly linked  list.

3. Doubly Circular Linked List:-
                                                                                In Doubly linked list the next pointer of the last node point to the first node and the previous pointer of the first node point to the last node making the circular in both direction.

4. Single Circular Linked List:-
                                                                            In Single circular linked list, the next pointer of the last node of the first node.

5. Circular Linked List:-
                                                            Circular Linked List is a variation list in which the first element points to the last element and the last element point of the first  element. Both Singly and Doubly Linked List can be made into a Circular Linked  List.





               

No comments:

Post a Comment