Programs, Files Data Structures
Programs, Files Data Structures
Programs, Files Data Structures
INTRODUCTION
Programs, Files Data Structures :
2
Basic Terminology
• Data: Data can be defined as an elementary value or the collection
of values, for example, student's name and its id are the data about
the student.
• Group Items: Data items which have subordinate data items are
called Group item, for example, name of a student can have first
name and the last name.
Basic Terminology
• File: A File is a collection of various records of one type of entity, for
example, if there are 60 employees in the class, then there will be 20
records in the related file where each record contains the data about
each employee.
in order to solve the above problems, data structures are used. Data is
organized to form a data structure in such a way that all items are not
required to be searched and required data can be searched instantly.
8
• Non Linear Data Structures: This data structure does not form a
sequence i.e. each item or element is connected with two or
more other items in a non-linear arrangement. The data elements
are not arranged in sequential structure.
11
1) Traversing: Every data structure contains the set of data elements. Traversing
the data structure means visiting each element of the data structure in order to
perform some specific operation like searching or sorting.
If the size of data structure is n then we can only insert n data elements into it.
3) Deletion: The process of removing an element from the data structure is called
Deletion. We can delete an element from the data structure at any random location.
If we try to delete an element from an empty data structure then underflow occurs.
12
6) Merging: When two lists List A and List B of size M and N respectively, of
similar type of elements, clubbed or joined to produce the third list, List C of
size (M+N), then this process is called merging
13