CHAPTER-01
What
is Data Structure
• The logical or mathematical model used to
organize the data in
main memory is called a data structure .
• Various types of data structures are
available each with its special features.
• The data structures are divided in two
categories linear-data structures, non-linear data structures.
Primitive
& non-Primitive DS
- Each programming
language provides various data types and each data type is represented
differently within the computer’s memory. The memory requirement of a
data type determines the permissible range of values for that data type.
The data types can be classified in several categories, including
primitive data types and non primitive data types.
• The data types provided by a
programming language are known as primitive data types or in-built data
types.
• Different
programming languages provide different set of primitive data types.
• For Example, the primitive data types
in the c languages are int,char,float,long etc.
• The data types that are derived from
primitive data types of the programming language are known as
non-primitive data types of the programming language are known as
non-primitive data types or derived data types.
• Various data types in the C language include
arrays,functions and pointers.
• In addition to primitive and
non-primitive data types, programming languages allows to define new
data types or user-defined data types as per the user’s requirements.
For example, the various user-defined data types provided by C are
structures, unions and enumerations.
Linear & Non Linear DS
• Linear Data
Structure is one in which its elements form a sequence. It means each
element in the structure has a unique predecessor(past) and a unique
successor(future) and array is the simplest linear structure.
•
Linear data structure is one in which its elements form 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. Various other linear data structures are linked lists,
stacks and queues.
•
A non-linear data structure is one in which its elements do not
form 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 structures which come under this
category.
0 comments:
Post a Comment