PROGRAMING LANGUAGE ‘C’

DATA STRUCTURE

DATA STRUCTUR

Data May Be Organized In Many Different Ways: The Logical Or Mathematical Model Of A Particular Organization Of Data Is Called Data Structure, Tha=E Choice Of A Particular Data Model Depends On Two Considerations. First, It Must Be Rich Enough In Structure Should Be Simple Enough That One Can Effectively Process The Data When Necessary. 

Algorithm + Data Structure = Program

You Know That An Algorithm Is A Step-By-Step Procedure To Solve A Particular Function. That Is, It Is A Set Of Instruction Written  To Carry Out Certain Tasks And The Data Structure Is The Way Of Organizing The Data With Their Logical Relationship Retained.

Classification Of Data Structures

Data Structure Are Normally Divided Into Two Broad Categories:

1. Primitive Data Structure

2. Non-Primitive Data Structure 

Primitive Data structure

These are basic structure and are directly operated upon by the machine instructions. In general, they have different representations on different computers. Integers, floating-point numbers, character constants, string constant, pointer, etc. fall in this type of data structure.

Non-primitive data structure

These are more sophisticated Data structure. These are derived from the primitive Data structure. The non-primitive data structure emphasizes on structuring of a group of homogeneous (same type) or heterogeneous (different type) data item. Array, lists and files are example non-primitive Data structure are divided into two parts.

1. linear Data structure

2. Non linear Data structure

Linear Data structure: 

linear Data structure is one in which its element from a sequence. It means each element in the structure has a unique predecessor and a unique successor.

An array is the simplest linear Data structure.

 

ARRAY: A finite collection of homogeneous(name type) elements is called as an array.

stack: A stack is a linear list of data elements in which addition of a new element or deletion of an element occurs only at one end. This end is called Top of the stack. The operation of adding new element in the stack and deleting an element from the stack is called Push and Pop respectively.

Queue: A queue is a linear data structure in which addition or Insertion of a new element occurs at one end. called Rear and deletion of an element occurs at other end called Front.

Link list: Link list is a linear data structure. A  linked list is a linear collection of similar data element , called nodes with each node containing some data and pointer(s) pointing to other nodes(s) in the list. 

Non-linear data structure : A non-linear data structure is one in which its elements are not from a sequence. It means unlike linear data structure, each element  is not constrained to have a unique predecessor and a unique successor. Trees and graphs are the two data structure, are known as non- linear Data structures.

TREE : We observe a hierarchical relationship between various data element . This hierarchical relationship between data element can easily be represented using a non-linear data structure called trees.

Graphs : A graph consists of a pair of two non-empty sets V and E, where V is a set of vertices or node and E is a set of edges. The graph is used id used to represent the non- hierarchical  relationship among pairs of data elements.

Scroll to Top