0% found this document useful (0 votes)
4 views

data structure

This document introduces data structures, defining them as organized data with allowed operations, and categorizes them into linear and non-linear types. It outlines the operations that can be performed on data structures, such as traversing, insertion, deletion, and searching. Additionally, it discusses abstract data types (ADTs) and their characteristics, emphasizing encapsulation and information hiding.

Uploaded by

bhavika.joshi
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

data structure

This document introduces data structures, defining them as organized data with allowed operations, and categorizes them into linear and non-linear types. It outlines the operations that can be performed on data structures, such as traversing, insertion, deletion, and searching. Additionally, it discusses abstract data types (ADTs) and their characteristics, emphasizing encapsulation and information hiding.

Uploaded by

bhavika.joshi
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

UNIT-1 INTRODUCTION TO DATA STRUCTURE

1.1 Introduction : Concepts and Need of data stuctures ,Definition ,Abstract


Data types
1.2 Types of Data structure
1. Linear data structure 2. Non linear data structure
1.3 Operations on data structure
1.Traversing 2.Insertion 3.Deletion 4.sorting
5.searching

Introduction to Data:
Data: Data is the basic entity or fact that is used in calculation or manipulation
process.
Data is value or set of values which does not give any meaning. It is generally a
raw fact.
For example,
1. 34 2. 13/05/2008
3.12,34,43,21
DATA TYPE : A data type is a term which refers to the kind of data that may
appear in computation. Every programming language has its own set of built-in
data types.
Example: Data
Data Datatype
34 Numeric
21,1,3 Array of integers
12/05/2000 Date

In C, the following are the basic data types are: int, long, char, float, double,
void etc.
Definition of Data structure:
“The data structure is the logical or mathematical model of particular
organization of data.”.
Data Structure = Organized data + Allowed Operations

1
OBJECTIVES OF DATA STRUCTURE
 To identify and create useful mathematical entities and operations to
determine what classes of problems can be solved by using these entities
and operations.
 To determine the representation of these abstract entities and to
implement the abstract operations on these concrete representation.

NEED OF A DATA STRUCTURE


 To understand the relationship of one data elements with the other and
organize it within the memory.
 A data structures helps to analyze the data, store it and organize it in a
logical or mathematical manner. 
 Data structures allow us to achieve an important goal: component reuse.

ABSTRACT DATA TYPE


 Abstract Data type (ADT) is a type (or class) for objects whose behavior
is defined by a set of values and a set of operations.
 The definition of ADT only mentions what operations are to be
performed but not how these operations will be implemented.
 It does not specify how data will be organized in memory and what
algorithms will be used for implementing the operations.
 It is called “abstract” because it gives an implementation-independent
view.
The process of providing only the essentials and hiding the details is known as
abstraction.
Characteristics of ADT
 Encapsulation: ADT encapsulates data and the operations on data
together, where the data is not accessible to the outside world, and only
the operations are allowed on it.
 Information Hiding: ADTs expose only the necessary details, keeping
the internal mechanisms hidden from users.

2
CLASSIFICATION OF DATA STRUCTURE
Based on how the data items are operated, it will classify into two broad
categories.
1. Linear data structure
2. Non linear data structure

1.Linear data structure


Linear data structures store data in a sequential manner, where each element is
connected to its previous and next element.
Examples are array ,stack,queue and linked list.
1.Array: Arrays are defined as the collection of similar types of data items
stored at contiguous memory locations.

3
2.Linked list: A linked list is a linear data structure that consists of a
series of nodes connected by pointers. Each node contains data and
a reference to the next node in the list. Unlike arrays, linked lists allow for
efficient insertion or removal of elements from any position in the list, as
the nodes are not stored contiguously in memory.

3. Stack :A Stack is a linear data structure that follows a particular order


in which the operations are performed. The order may be LIFO(Last In
First Out) or FILO(First In Last Out). LIFO implies that the element that
is inserted last, comes out first and FILO implies that the element that is
inserted first, comes out last.

4
4. Queue: A Queue is a Linear Data Structure is a fundamental concept
in computer science used for storing and managing data in a specific order. It
follows the principle of “First in, First out” (FIFO), where the first element
added to the queue is the first one to be removed.

2. Non Linear Data structure:


Data structures where data elements are not arranged sequentially or
linearly are called non-linear data structures. In a non-linear data
structure, single level is not involved. Therefore, we can’t traverse all the
elements in single run only. Non-linear data structures are not easy to
implement in comparison to linear data structure. It utilizes computer
memory efficiently in comparison to a linear data structure. Its examples
are trees and graphs.
1. Tree: A tree is a nonlinear data structure consists of various nodes
linked together. The structure of a tree is hierarchical that forms a
relationship like that of the parent and a child.

5
2. Graph: Graphs are those types of non-linear data structures which
consist of a definite quantity of vertices and edges. The vertices or the
nodes are involved in storing data and the edges show the vertices
relationship.

OPERATIONS ON DATA STRUCTURE

There are different types of operations that can be performed for the
manipulation of data in every data structure. Some operations are explained
and illustrated below:
1. Traversing: Traversing a Data Structure means to visit the element
stored in it. It visits data in a systematic manner. This can be done with
any type of Data structure.
2. Insertion: It is the operation which we apply on all the data-structures.
Insertion means to add an element in the given data structure. The
operation of insertion is successful when the required element is added to
the required data-structure.
It is unsuccessful in some cases when the size of the data structure is full
and when there is no space in the data-structure to add any additional
element.
3. Deletion: It is the operation which we apply on all the data-structures.
Deletion means to delete an element in the given data structure. The
operation of deletion is successful when the required element is deleted
from the data structure.
4. Searching : Searching means to find a particular element in the given
data-structure. It is considered as successful when the required element
is found

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy