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

Introduction To Data Structures

Data structures are used to organize and store data so it can be accessed efficiently. They allow storing multiple types of data within a single object. Data structures include linear structures like arrays, stacks and queues as well as non-linear structures like trees and graphs. Data structures provide efficient ways to organize, retrieve, manage and store data which makes data representation and access easier while reducing time and memory requirements compared to disorganized data.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views

Introduction To Data Structures

Data structures are used to organize and store data so it can be accessed efficiently. They allow storing multiple types of data within a single object. Data structures include linear structures like arrays, stacks and queues as well as non-linear structures like trees and graphs. Data structures provide efficient ways to organize, retrieve, manage and store data which makes data representation and access easier while reducing time and memory requirements compared to disorganized data.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Data structures using C++

Bsc II year III Sem


Introduction to Data Structures
1. What is Data Structure

A data structure is a storage that is used to store and organize data. It is a way of arranging data on
a computer so that it can be accessed and updated efficiently.

A data structure is not only used for organizing the data. It is also used for processing,
retrieving, and storing data. There are different basic and advanced types of data structures that
are used in almost every program or software system that has been developed. So we must have
good knowledge about data structures.
How Data Structure varies from Data Type

Data Type Data Structure

The data type is the form of a variable to which a value Data structure is a collection of different kinds of
can be assigned. It defines that the particular variable data. That entire data can be represented using an
will assign the values of the given data type only. object and can be used throughout the program.

It can hold multiple types of data within a single


It can hold value but not data. Therefore, it is dataless.
object.

The implementation of a data type is known as abstract Data structure implementation is known as concrete
implementation. implementation.

In data structure objects, time complexity plays an


There is no time complexity in the case of data types.
important role.
How Data Structure varies from Data Type

Data Type Data Structure

In the case of data types, the value While in the case of data structures, the data and its value
of data is not stored because it only acquire the space in the computer’s main memory. Also, a
represents the type of data that can data structure can hold different kinds and types of data
be stored. within one single object.

Data type examples are int, float,


Data structure examples are stack, queue, tree, etc.
double, etc.
Classification of Data Structure
Classification of Data Structure
Primitive Data Structure: Primitive data structures consist of the numbers and the characters which are built in programs. These can be manipulated or
operated directly by the machine level instructions. Basic data types such as integer, real, character, and Boolean come under primitive data structures.
These data types are also known as simple data types because they consist of characters that cannot be divided.

Non-primitive Data Structure: Non-primitive data structures are those that are derived from primitive data structures. These data structures cannot be
operated or manipulated directly by the machine level instructions. They focus on formation of a set of data elements that is either homogeneous (same
data type) or heterogeneous (different data type). These are further divided into linear and non-linear data structure based on the structure and
arrangement of data.
● Linear data structure: Data structure in which data elements are arranged sequentially or linearly, where each element is attached to its
previous and next adjacent elements, is called a linear data structure.
Examples of linear data structures are array, stack, queue, linked list, etc.
● Static data structure: Static data structure has a fixed memory size. It is easier to access the elements in a static data structure.
An example of this data structure is an array.
● Dynamic data structure: In the dynamic data structure, the size is not fixed. It can be randomly updated during the runtime which may
be considered efficient concerning the memory (space) complexity of the code.
Examples of this data structure are queue, stack, etc.
● Non-linear data structure: Data structures where data elements are not placed sequentially or linearly are called non-linear data structures. In
a non-linear data structure, we can’t traverse all the elements in a single run only.
Examples of non-linear data structures are trees and graphs.
Need Of Data structure

The structure of the data and the synthesis of the algorithm are relative to each other. Data presentation must be
easy to understand so the developer, as well as the user, can make an efficient implementation of the operation.
Data structures provide an easy way of organizing, retrieving, managing, and storing data.
Here is a list of the needs for data.
1. Data structure modification is easy.
2. It requires less time.
3. Save storage memory space.
4. Data representation is easy.
5. Easy access to the large database.
Summary
● Data structure.
● Diff between data type and data structure.
● Classification of data structure
○ Linear data structure
○ Non-linear data structure.
● Need of data structure

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