0% found this document useful (0 votes)
16 views42 pages

18 PCE23CS019 Ankit Singh (1) ..........

This Industrial Training Report details the internship experience of Ankit Singh at CYNBIT TECHNOLOGIES.LTD, focusing on Data Structures and Algorithms (DSA) with C++. The report highlights the importance of mastering DSA, C++, Linux, and GitHub for efficient software development and emphasizes the practical skills gained during the training. It also includes acknowledgments, technical training details, and an overview of various data structures and their applications.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views42 pages

18 PCE23CS019 Ankit Singh (1) ..........

This Industrial Training Report details the internship experience of Ankit Singh at CYNBIT TECHNOLOGIES.LTD, focusing on Data Structures and Algorithms (DSA) with C++. The report highlights the importance of mastering DSA, C++, Linux, and GitHub for efficient software development and emphasizes the practical skills gained during the training. It also includes acknowledgments, technical training details, and an overview of various data structures and their applications.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 42

An

Industrial Training Report

on

Software Developer

At

CYNBIT TECHNOLOGIES.LTD,Jaipur

Submitted in partial fulfilment of the requirements for the award of the degree of

Bachelor of Technology

In

Computer Science & Engineering

(Session 2024-2025)
Submitted to- Submitted by-
MR. Rohit Singh Rajput Akash Mahawar
(Assistant Professor) PCE23CS012

DEPARTMENT OF COMPUTER ENGINEERING


POORNIMA COLLEGE OF ENGINEERING, JAIPUR
RAJASTHAN TECHNICAL UNIVERSITY, KOTA

December 2024

1
i
DECLARATION

I hereby declare that the work which is being presented in the Industrial Training report titled DSA
With C++ in partial fulfilment for the award of the Degree of Bachelor of Technology in Computer
Science & Engineering and submitted to the Department of Computer Engineering, Poornima College
of Engineering, Jaipur is an authentic record of my own work carried out at CYNBIT
TECHNOLOGIES.LTD, Jaipur during the session 2024-25.
I have not submitted the matter presented in this report anywhere for the award of any other Degree.

Signature of the Student:-

Name: Ankit Singh

Reg. No. PCE23CS019

2
ii

DEPARTMENT Of Computer Engineering

Date: 02/01/2024

CERTIFICATE

This is to certify that Industrial Training report titled DSA With C++has been submitted by Ankit Singh, PCE23CS019
in partial fulfilment for the award of the Degree of Bachelor of Technology in Computer Science & Engineering during
the session 2024-25, Odd Semester. The industrial training work is found satisfactory and approved for submission.

Mr. Rohit Singh Rajput Dr. Nikita Jain


(Assistant Professor) (HOD, CE)

3
4
iii

ACKNOWLEDGEMENT

I would like to convey my profound sense of reverence and admiration to my supervisor Mr.
Prajjal Dhar, Trainer at CYNBIT TECHNOLOGIES.LTD for his intense concern,
attention, priceless direction, guidance, and encouragement throughout this internship.

My special heartfelt gratitude goes to Dr.Nikita Jain, Associate Professor & Head,
Department of Computer Engineering, Poornima College of Engineering, for unwavering
support, guidance, and motivation during the course of this research.

My special heartfelt gratitude goes to Dr. Nikita Jain, Head of Department of Computer
Engineering, and Mr. Manish Dubey, Deputy Head of Department of Computer
Engineering, Poornima College of Engineering, for unvarying support, guidance and
motivation during the course of this research.

I am grateful to Dr. Mahesh Bundele, Director, Poornima College of Engineering for his
helping attitude with a keen interest in completing this training work in time.

I would like to express my deep sense of gratitude towards management of Poornima


College of Engineering including Dr. S. M. Seth, Chairman Emeritus, Poornima Group
and former Director NIH, Roorkee, Shri Shashikant Singhi, Chairman, Poornima
Group, Mr. M. K. M. Shah, Director Admin & Finance, Poornima Group and Ar.
Rahul Singhi, Director Poornima Group for establishment of institute and providing
facilities for my studies.

I am deeply thankful to my parents and all other family members for their blessings and
inspiration. Last, but not least, I would like to give special thanks to God who enabled me to
complete my training on time.

Ankit Singh

PCE23CS019

5
iv
TABLE OF CONTENTS

S.NO. PARTICULARS PAGE


NO.

Title Page

Candidate’s Declaration i

Certificate(s) of all Training undergone ii

Certificate by the Department iii

Acknowledgment iii

Table of Contents iv

Abstract v

Training Platforms and Trainer 1


description
1 Basic C++ 2
1.1 Introduction
1.2 Several aspects of C++
1.3 Process

2 Hardware and software requirement 7


1.1 Hardware required
1.2 Software required

3 Tools 12
3.1 Introduction
3.2 Features
4 Data Structures 15
4.1 Introduction
4.2 What is
Data Structures?
4.3Types of Data structures
5 Tree 16
5.1 What is Tree?
5.2 Graph

6 References & 18
Conclusion

6
v

ABSTRACT

This report encapsulates the enriching experience and insights gained during a Data Structures and
Algorithms (DSA) internship focused on leveraging theoretical knowledge in conjunction with practical
applications. The internship aimed at refining technical skills, particularly in C++ programming, Linux
environment, and version control using GitHub. DSA forms the backbone of efficient and optimized
software solutions, playing a pivotal role in algorithmic problem-solving and system design.

DSA, C++, Linux, and GitHub collectively contribute to a robust foundation for software development.
This report provides an overview of the current landscape and best practices in utilizing DSA principles
with C++ programming, navigating the Linux environment, and optimizing version control through
GitHub. It explores the challenges and opportunities encountered by developers in this domain, including
algorithmic efficiency, code optimization, system resource management, and collaborative coding
practices.

The report delves into the crucial role of DSA, C++, Linux, and GitHub in creating efficient and scalable
software solutions. It highlights the importance of continuous learning to stay abreast of the evolving
landscape, emphasizing effective communication in collaborative coding environments. The conclusion
summarizes the emerging trends and future directions in DSA, C++, Linux, and GitHub, providing
insights into their implications for businesses and developers alike. The internship has proven to be a
valuable learning experience, emphasizing the significance of adapting to the dynamic nature of the
software development.

7
6
CHAPTER-1
INTRODUCTION

1.1 Full name of the Internship: Competitive Programming with C++ 1.2 Training

Platform: Offline Mode at Gopalpura, Jaipur

1.3 Training Starting Date: 11 July, 2024

1.4 Training Ending Date: 26 July, 2024

1.5 Total Training Duration: 15 Days

1.6 Date of Certification: 26, 2024

1.7 Conclusion

In conclusion, the realm of Data Structures and Algorithms (DSA), C++, Linux, and GitHub is dynamic
and fundamental to the core of software development. As technology continuously evolves, the demand
for adept professionals in these domains remains high. Mastering key concepts in DSA, proficient
programming in C++, navigating the Linux environment, and utilizing version control through GitHub
opens up vast opportunities for individuals in the software development landscape.

Professionals in DSA, C++, Linux, and GitHub contribute significantly to the efficiency and
optimization of software solutions. Their expertise is pivotal in algorithmic problem-solving, system
design, and collaborative coding practices. Continuous learning and staying abreast of industry trends are
paramount in this ever-changing field. Engaging in online communities, attending relevant conferences,
and participating in live industry projects are avenues for professionals to expand their knowledge and
remain at the forefront of advancements.

Success in DSA, C++, Linux, and GitHub is not merely about technical proficiency; it involves effective
collaboration and communication. Building strong teamwork and communication skills is essential for
working seamlessly with other developers, designers, and stakeholders. This collaborative spirit
enhances project success, fostering a creative and cooperative work environment in the realm of DSA,
C++, Linux, and GitHub.

1
CHAPTER-2
TECHNICAL TRAINING PLATFORM

 Introduction to the Company

CYNBIT TECHNOLOGIES.LTD is a prominent software services company with a strong


presence in the industry, delivering innovative solutions to businesses across diverse sectors.
Headquartered in Jaipur with a significant operational hub in Pune, the company excels in software
development, industry-oriented training, and live industry projects. Specializing in technologies such
as big data, machine learning, artificial intelligence, data science, Python, cloud computing (AWS
and Azure), Linux, DevOps, Dot Net, Salesforce, MEAN, and MERN Stack, REGex Software
utilizes cutting-edge tools and a team of seasoned professionals to provide high-quality and
customized software services.
Founded by industry veterans CYNBIT TECHNOLOGIES LTD demonstrates a
commitment to excellence and innovation. The company embraces a forward-thinking approach,
staying ahead of industry trends and fostering a collaborative work culture. This dedication to
continuous learning positions CYNBIT TECHNOLOGIES LTD as a trusted partner for
businesses seeking tailored and impactful solutions in the dynamic field of software development.

 Reason of Selecting this Platform

I chose CYNBIT TECHNOLOGIES LTD for my industrial training, and having


successfully completed the internship, I can attest to the invaluable experience it provided. The
decision to train with CYNBIT TECHNOLOGIES LTD stemmed from its distinguished
standing in the software industry, offering a wide spectrum of innovative services tailored to diverse
business needs. Through this internship, I had the opportunity to immerse myself in real-world
projects, enhancing my practical skills and gaining insights into the dynamic landscape of software
development. The presence of Ashish Mathur, the co-founder of CYNBIT
TECHNOLOGIES LTD, was a significant factor in my choice. Learning under his leadership
allowed me to grasp the intricacies of the industry and witness firsthand the visionary approach that
has propelled CYNBIT TECHNOLOGIES LTD to success. The collaborative

2
and growth-centric work culture at CYNBIT TECHNOLOGIES LTD further enriched my
training experience, fostering a conducive environment for continuous learning and skill
development.

As a testament to the success of the internship, I can confidently say that CYNBIT
TECHNOLOGIES LTD was a strategic decision that has positively shaped my understanding
of the software domain. The exposure to cutting-edge technologies, collaboration with experienced
professionals, and the mentorship of industry leaders like Ashish Mathur collectively made this
training experience both rewarding and impactful for my professional development.

 Technical Profile of the Instructor

Prajjal Dhar is an experienced instructor with a strong technical profile focused on the MERN stack. He
excels in front-end development using React and modern JavaScript libraries, while also demonstrating
proficiency in back-end technologies like Node.js and Express.js. Prajjal is skilled in designing RESTful
APIs, integrating MongoDB, and deploying applications on platforms like Heroku and AWS. His
expertise extends to third-party service integration, including Node mailer and Stripe.

In addition to MERN stack proficiency, Prajjal has a background in data science and machine learning,
showcasing knowledge in Python and popular libraries such as TensorFlow and Scikit-Learn. This
allows him to implement data-driven features within web applications. Eager to contribute to the
industry, Prajjal is open to challenges in MERN stack development and exploring opportunities in data
science and machine learning.

3
CHAPTER-3
TECHNOLOGY INTRODUCTION

What is Data Structure?


A Data Structure is a way of organizing and storing data to facilitate efficient retrieval and
modification. It defines a specific format for organizing and storing data elements, such as arrays,
linked lists, trees, and graphs. Data structures provide a foundation for algorithm implementation,
allowing programmers to manipulate and process data effectively. The choice of a data structure
depends on the specific requirements of the task at hand, considering factors like access patterns,
insertion and deletion operations, and memory constraints. Well-designed data structures optimize
performance, reducing time and space complexity for common operations, and are essential for
efficient software development.

 How Data Structure varies from Data Type?


A data structure and a data type are related concepts in computer science, but they refer to
different aspects of organizing and managing data:

1. Data Type:

 A data type defines a set of values along with operations that can be performed on
those values.
 It specifies how the data is represented in terms of bits and bytes.
 Examples of data types include integers, floating-point numbers, characters, and
user defined types like classes or structures in programming languages.

 Data types define the kind of data that a variable can hold and the operations that
can be performed on that data.

4
2. Data Structure:

 A data structure is a way of organizing and storing data to perform operations


efficiently.
 It focuses on the arrangement and relationship between the individual elements of
data.
 Examples of data structures include arrays, linked lists, stacks, queues, trees, and
graphs.
 Data structures provide a framework for implementing algorithms and organizing
data to achieve optimal performance for specific operations.

Classification of Data Structure


Data structure has many different uses in our daily life. There are many different data
structures that are used to solve different mathematical and logical problems. By using data
structure, one can organize and process a very large amount of data in a relatively short
period. Let’s look at different data structures that are used in different situations.

 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.

5
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.

6
 Reversing a linked list: The linked list can be reversed by updating the references of
each node so that they point to the previous node instead of the next node.

Applications of the Linked List


Different applications of linked lists are as follows:
 Linked lists are used to implement stacks, queues, graphs, etc.
 Linked lists are used to perform arithmetic operations on long integers.
 It is used for the representation of sparse matrices.
 It is used in the linked allocation of files.
 It helps in memory management.
 It is used in the representation of Polynomial Manipulation where each polynomial term
represents a node in the linked list.
 Linked lists are used to display image containers. Users can visit past, current, and next
images.
 They are used to store the history of the visited page.
 They are used to perform undo operations.
 Linked are used in software development where they indicate the correct syntax of a
tag.
 Linked lists are used to display social media feeds.

Real-Life Applications of a Linked List

 A linked list is used in Round-Robin scheduling to keep track of the turn in multiplayer
games.
 It is used in image viewer. The previous and next images are linked, and hence can be
accessed by the previous and next buttons.
 In a music playlist, songs are linked to the previous and next songs.

Stack Data Structure


Stack is a linear data structure that follows a particular order in which the operations are
performed. The order is LIFO (Last in first out). Entering and retrieving data is possible from
only one end. The entering and retrieving of data are also called push and pop operation in a
stack. There are different operations possible in a stack like reversing a stack using recursion,
Sorting, Deleting the middle element of a stack, etc.

7
Characteristics of a Stack
Stack has various different characteristics which are as follows:
 Stack is used in many different algorithms like Tower of Hanoi, tree traversal,
recursion, etc.
 Stack is implemented through an array or linked list.
 It follows the Last in First Out operation i.e., an element that is inserted first will pop in
last and vice versa.
 The insertion and deletion are performed at one end i.e. from the top of the stack.
 In stack, if the allocated space for the stack is full, and still, anyone attempts to add
more elements, it will lead to stack overflow.

Applications of Stack

Different applications of Stack are as follows:


 The stack data structure is used in the evaluation and conversion of arithmetic
expressions.
 It is used for parenthesis checking.
 While reversing a string, the stack is used as well.
 Stack is used in memory management.
 It is also used for processing function calls.
 The stack is used to convert expressions from infix to postfix.
 The stack is used to perform undo as well as redo operations in word processors.
 The stack is used in virtual machines like JVM.
 The stack is used in the media players. Useful to play the next and previous song.
 The stack is used in recursion operations.

8
Operation performed on Stack

A stack is a linear data structure that implements the Last-In-First-Out (LIFO) principle. Here
are some common operations performed on stacks:

 Push: Elements can be pushed onto the top of the stack, adding a new element to the top
of the stack.
 Pop: The top element can be removed from the stack by performing a pop operation,
effectively removing the last element that was pushed onto the stack.
 Peek: The top element can be inspected without removing it from the stack using a peek
operation.
 IsEmpty: A check can be made to determine if the stack is empty.

 Size: The number of elements in the stack can be determined using a size operation.

Real-Life Applications of Stack


 Real life example of a stack is the layer of eating plates arranged one above the other.
When you remove a plate from the pile, you can take the plate to the top of the pile. But
this is exactly the plate that was added most recently to the pile. If you want the plate at
the bottom of the pile, you must remove all the plates on top of it to reach it.
 Browsers use stack data structures to keep track of previously visited sites.
 Call log in mobile also uses stack data structure.

9
Queue Data Structure
Queue is a linear data structure that follows a particular order in which the operations are
performed. The order is First In First Out(FIFO) i.e. the data item stored first will be accessed
first. In this, entering and retrieving data is not done from only one end. An example of a queue
is any queue of consumers for a resource where the consumer that came first is served first.
Different operations are performed on a Queue like Reversing a Queue (with or without using
recursion), Reversing the first K elements of a Queue, etc. A few basic operations performed In
Queue are enqueue, dequeue, front, rear, etc.

Characteristics of a Queue
The queue has various different characteristics which are as follows: 
The queue is a FIFO (First In First Out) structure.
 To remove the last element of the Queue, all the elements inserted before the new
element in the queue must be removed.
 A queue is an ordered list of elements of similar data types.

Applications of Queue

Different applications of Queue are as follows:


 Queue is used for handling website traffic.
 It helps to maintain the playlist in media players.
 Queue is used in operating systems for handling interrupts.
 It helps in serving requests on a single shared resource, like a printer, CPU task
scheduling, etc.
 It is used in the asynchronous transfer of data e.g. pipes, file IO, and sockets.
 Queues are used for job scheduling in the operating system.
 In social media to upload multiple photos or videos queue is
used.
 To send an e-mail queue data structure is used.
 To handle website traffic at a time queues are used.
 In Windows operating system, to switch multiple applications

10
Operation performed on Stack

A stack is a linear data structure that implements the Last-In-First-Out (LIFO) principle. Here
are some common operations performed on stacks:

 Push: Elements can be pushed onto the top of the stack, adding a new element to the top
of the stack.
 Pop: The top element can be removed from the stack by performing a pop operation,
effectively removing the last element that was pushed onto the stack.
 Peek: The top element can be inspected without removing it from the stack using a peek
operation.
 IsEmpty: A check can be made to determine if the stack is empty.

 Size: The number of elements in the stack can be determined using a size operation.

Real-Life Applications of Stack


 Real life example of a stack is the layer of eating plates arranged one above the other.
When you remove a plate from the pile, you can take the plate to the top of the pile. But
this is exactly the plate that was added most recently to the pile. If you want the plate at
the bottom of the pile, you must remove all the plates on top of it to reach it.
 Browsers use stack data structures to keep track of previously visited sites.
 Call log in mobile also uses stack data structure.

11
Queue Data Structure
Queue is a linear data structure that follows a particular order in which the operations are
performed. The order is First In First Out(FIFO) i.e. the data item stored first will be accessed
first. In this, entering and retrieving data is not done from only one end. An example of a queue
is any queue of consumers for a resource where the consumer that came first is served first.
Different operations are performed on a Queue like Reversing a Queue (with or without using
recursion), Reversing the first K elements of a Queue, etc. A few basic operations performed In
Queue are enqueue, dequeue, front, rear, etc.

Characteristics of a Queue
The queue has various different characteristics which are as follows: 
The queue is a FIFO (First In First Out) structure.
 To remove the last element of the Queue, all the elements inserted before the new
element in the queue must be removed.
 A queue is an ordered list of elements of similar data types.

Applications of Queue

Different applications of Queue are as follows:


 Queue is used for handling website traffic.
 It helps to maintain the playlist in media players.
 Queue is used in operating systems for handling interrupts.
 It helps in serving requests on a single shared resource, like a printer, CPU task
scheduling, etc.
 It is used in the asynchronous transfer of data e.g. pipes, file IO, and sockets.
 Queues are used for job scheduling in the operating system.
 In social media to upload multiple photos or videos queue is
used.
 To send an e-mail queue data structure is used.
 To handle website traffic at a time queues are used.
 In Windows operating system, to switch multiple applications

12
Operation performed on Stack

A stack is a linear data structure that implements the Last-In-First-Out (LIFO) principle. Here
are some common operations performed on stacks:

 Push: Elements can be pushed onto the top of the stack, adding a new element to the top
of the stack.
 Pop: The top element can be removed from the stack by performing a pop operation,
effectively removing the last element that was pushed onto the stack.
 Peek: The top element can be inspected without removing it from the stack using a peek
operation.
 IsEmpty: A check can be made to determine if the stack is empty.

 Size: The number of elements in the stack can be determined using a size operation.

Real-Life Applications of Stack


 Real life example of a stack is the layer of eating plates arranged one above the other.
When you remove a plate from the pile, you can take the plate to the top of the pile. But
this is exactly the plate that was added most recently to the pile. If you want the plate at
the bottom of the pile, you must remove all the plates on top of it to reach it.
 Browsers use stack data structures to keep track of previously visited sites.
 Call log in mobile also uses stack data structure.

13
Queue Data Structure
Queue is a linear data structure that follows a particular order in which the operations are
performed. The order is First In First Out(FIFO) i.e. the data item stored first will be accessed
first. In this, entering and retrieving data is not done from only one end. An example of a queue
is any queue of consumers for a resource where the consumer that came first is served first.
Different operations are performed on a Queue like Reversing a Queue (with or without using
recursion), Reversing the first K elements of a Queue, etc. A few basic operations performed In
Queue are enqueue, dequeue, front, rear, etc.

Characteristics of a Queue
The queue has various different characteristics which are as follows: 
The queue is a FIFO (First In First Out) structure.
 To remove the last element of the Queue, all the elements inserted before the new
element in the queue must be removed.
 A queue is an ordered list of elements of similar data types.

Applications of Queue

Different applications of Queue are as follows:


 Queue is used for handling website traffic.
 It helps to maintain the playlist in media players.
 Queue is used in operating systems for handling interrupts.
 It helps in serving requests on a single shared resource, like a printer, CPU task
scheduling, etc.
 It is used in the asynchronous transfer of data e.g. pipes, file IO, and sockets.
 Queues are used for job scheduling in the operating system.
 In social media to upload multiple photos or videos queue is
used.
 To send an e-mail queue data structure is used.
 To handle website traffic at a time queues are used.
 In Windows operating system, to switch multiple applications

14
Operation performed on Stack

A stack is a linear data structure that implements the Last-In-First-Out (LIFO) principle. Here
are some common operations performed on stacks:

 Push: Elements can be pushed onto the top of the stack, adding a new element to the top
of the stack.
 Pop: The top element can be removed from the stack by performing a pop operation,
effectively removing the last element that was pushed onto the stack.
 Peek: The top element can be inspected without removing it from the stack using a peek
operation.
 IsEmpty: A check can be made to determine if the stack is empty.

 Size: The number of elements in the stack can be determined using a size operation.

Real-Life Applications of Stack


 Real life example of a stack is the layer of eating plates arranged one above the other.
When you remove a plate from the pile, you can take the plate to the top of the pile. But
this is exactly the plate that was added most recently to the pile. If you want the plate at
the bottom of the pile, you must remove all the plates on top of it to reach it.
 Browsers use stack data structures to keep track of previously visited sites.
 Call log in mobile also uses stack data structure.

15
Queue Data Structure
Queue is a linear data structure that follows a particular order in which the operations are
performed. The order is First In First Out(FIFO) i.e. the data item stored first will be accessed
first. In this, entering and retrieving data is not done from only one end. An example of a queue
is any queue of consumers for a resource where the consumer that came first is served first.
Different operations are performed on a Queue like Reversing a Queue (with or without using
recursion), Reversing the first K elements of a Queue, etc. A few basic operations performed In
Queue are enqueue, dequeue, front, rear, etc.

Characteristics of a Queue
The queue has various different characteristics which are as follows: 
The queue is a FIFO (First In First Out) structure.
 To remove the last element of the Queue, all the elements inserted before the new
element in the queue must be removed.
 A queue is an ordered list of elements of similar data types.

Applications of Queue

Different applications of Queue are as follows:


 Queue is used for handling website traffic.
 It helps to maintain the playlist in media players.
 Queue is used in operating systems for handling interrupts.
 It helps in serving requests on a single shared resource, like a printer, CPU task
scheduling, etc.
 It is used in the asynchronous transfer of data e.g. pipes, file IO, and sockets.
 Queues are used for job scheduling in the operating system.
 In social media to upload multiple photos or videos queue is
used.
 To send an e-mail queue data structure is used.
 To handle website traffic at a time queues are used.
 In Windows operating system, to switch multiple applications
Queue Data Structure
16
Queue is a linear data structure that follows a particular order in which the operations are
performed. The order is First In First Out(FIFO) i.e. the data item stored first will be accessed
first. In this, entering and retrieving data is not done from only one end. An example of a queue
is any queue of consumers for a resource where the consumer that came first is served first.
Different operations are performed on a Queue like Reversing a Queue (with or without using
recursion), Reversing the first K elements of a Queue, etc. A few basic operations performed In
Queue are enqueue, dequeue, front, rear, etc.

Characteristics of a Queue
The queue has various different characteristics which are as follows: 
The queue is a FIFO (First In First Out) structure.
 To remove the last element of the Queue, all the elements inserted before the new
element in the queue must be removed.
 A queue is an ordered list of elements of similar data types.

Applications of Queue

Different applications of Queue are as follows:


 Queue is used for handling website traffic.
 It helps to maintain the playlist in media players.
 Queue is used in operating systems for handling interrupts.
 It helps in serving requests on a single shared resource, like a printer, CPU task
scheduling, etc.
 It is used in the asynchronous transfer of data e.g. pipes, file IO, and sockets.
 Queues are used for job scheduling in the operating system.
 In social media to upload multiple photos or videos queue is
used.
 To send an e-mail queue data structure is used.
 To handle website traffic at a time queues are used.
 In Windows operating system, to switch multiple applications

17
Operation performed on Stack

A stack is a linear data structure that implements the Last-In-First-Out (LIFO) principle. Here
are some common operations performed on stacks:

 Push: Elements can be pushed onto the top of the stack, adding a new element to the top
of the stack.
 Pop: The top element can be removed from the stack by performing a pop operation,
effectively removing the last element that was pushed onto the stack.
 Peek: The top element can be inspected without removing it from the stack using a peek
operation.
 IsEmpty: A check can be made to determine if the stack is empty.

 Size: The number of elements in the stack can be determined using a size operation.

Real-Life Applications of Stack


 Real life example of a stack is the layer of eating plates arranged one above the other.
When you remove a plate from the pile, you can take the plate to the top of the pile. But
this is exactly the plate that was added most recently to the pile. If you want the plate at
the bottom of the pile, you must remove all the plates on top of it to reach it.
 Browsers use stack data structures to keep track of previously visited sites.

Call log in mobile also uses stack data structure.

18
Queue Data Structure
Queue is a linear data structure that follows a particular order in which the operations are
performed. The order is First In First Out(FIFO) i.e. the data item stored first will be accessed
first. In this, entering and retrieving data is not done from only one end. An example of a queue
is any queue of consumers for a resource where the consumer that came first is served first.
Different operations are performed on a Queue like Reversing a Queue (with or without using
recursion), Reversing the first K elements of a Queue, etc. A few basic operations performed In
Queue are enqueue, dequeue, front, rear, etc.

Characteristics of a Queue
The queue has various different characteristics which are as follows: 
The queue is a FIFO (First In First Out) structure.
 To remove the last element of the Queue, all the elements inserted before the new
element in the queue must be removed.
 A queue is an ordered list of elements of similar data types.

Applications of Queue

Different applications of Queue are as follows:


 Queue is used for handling website traffic.
 It helps to maintain the playlist in media players.
 Queue is used in operating systems for handling interrupts.
 It helps in serving requests on a single shared resource, like a printer, CPU task
scheduling, etc.
 It is used in the asynchronous transfer of data e.g. pipes, file IO, and sockets.
 Queues are used for job scheduling in the operating system.
 In social media to upload multiple photos or videos queue is
used.
 To send an e-mail queue data structure is used.
 To handle website traffic at a time queues are used.
 In Windows operating system, to switch multiple applications

19
Operation performed on Stack

A stack is a linear data structure that implements the Last-In-First-Out (LIFO) principle. Here
are some common operations performed on stacks:

 Push: Elements can be pushed onto the top of the stack, adding a new element to the top
of the stack.
 Pop: The top element can be removed from the stack by performing a pop operation,
effectively removing the last element that was pushed onto the stack.
 Peek: The top element can be inspected without removing it from the stack using a peek
operation.
 IsEmpty: A check can be made to determine if the stack is empty.

 Size: The number of elements in the stack can be determined using a size operation.

Real-Life Applications of Stack


 Real life example of a stack is the layer of eating plates arranged one above the other.
When you remove a plate from the pile, you can take the plate to the top of the pile. But
this is exactly the plate that was added most recently to the pile. If you want the plate at
the bottom of the pile, you must remove all the plates on top of it to reach it.
 Browsers use stack data structures to keep track of previously visited sites.
Call log in mobile also uses stack data structure.

20
Array Data Structure
An array is a linear data structure and it is a collection of items stored at contiguous memory
locations. The idea is to store multiple items of the same type together in one place. It allows
the processing of a large amount of data in a relatively short period. The first element of the
array is indexed by a subscript of 0. There are different operations possible in an array, like
Searching, Sorting, Inserting, Traversing, Reversing, and Deleting.

Characteristics of an Array

An array has various characteristics which are as follows:


 Arrays use an index-based data structure which helps to identify each of the elements in
an array easily using the index.
 If a user wants to store multiple values of the same data type, then the array can be
utilized efficiently.
 An array can also handle complex data structures by storing data in a two-dimensional
array.
 An array is also used to implement other data structures like Stacks, Queues, Heaps,
Hash tables, etc.
 The search process in an array can be done very easily.

Operations performed on Array

Here are some operations performed on array


 Initialization: An array can be initialized with values at the time of declaration or later
using an assignment statement.
 Accessing elements: Elements in an array can be accessed by their index, which starts
from 0 and goes up to the size of the array minus one.
 Searching for elements: Arrays can be searched for a specific element using linear
search or binary search algorithms.
 Sorting elements: Elements in an array can be sorted in ascending or descending order
using algorithms like bubble sort, insertion sort, or quick sort.
 Inserting elements: Elements can be inserted into an array at a specific location, but this
operation can be time-consuming because it requires shifting existing elements in the
array.
 Deleting elements: Elements can be deleted from an array by shifting the elements that
21
come after it to fill the gap.
 Updating elements: Elements in an array can be updated or modified by assigning anew
value to a specific index.
 Traversing elements: The elements in an array can be traversed in order, visiting each
element once.

Applications of Array

Different applications of an array are as follows:


 An array is used in solving matrix problems.
 Database records are also implemented by an array.
 It helps in implementing a sorting algorithm.
 It is also used to implement other data structures like Stacks, Queues, Heaps, Hash
tables, etc.
 An array can be used for CPU scheduling.
 Can be applied as a lookup table in computers.
 Arrays can be used in speech processing where every speech signal is an array.
 The screen of the computer is also displayed by an array. Here we use a
multidimensional array.
 The array is used in many management systems like a library, students, parliament, etc.
 The array is used in the online ticket booking system. Contacts on a cell phone are
displayed by this array.
 In games like online chess, where the player can store his past moves as well as current
moves. It indicates a hint of position.
 To save images in a specific dimension in the android Like 360*1200

Real-Life Applications of Array

 An array is frequently used to store data for mathematical computations.


 It is used in image processing.
 It is also used in record management.
 Book pages are also real-life examples of an array.
 It is used in ordering boxes as well.

Linked List Data Structure


A linked list is a linear data structure in which elements are not stored at contiguous memory
locations. The elements in a linked list are linked using pointers as shown in the below image.

Types of linked lists:

22
 Singly linked list
 Doubly linked list
 Circular linked list
 Doubly circular linked list

Characteristics of a Linked List

A linked list has various characteristics which are as follows:


 A linked list uses extra memory to store links.
 During the initialization of the linked list, there is no need to know the size of the
elements.
 Linked lists are used to implement stacks, queues, graphs, etc.
 The first node of the linked list is called the Head.
 The next pointer of the last node always points to NULL.
 In a linked list, insertion and deletion are possible easily.
 Each node of the linked list consists of a pointer/link which is the address of the next
node.
 Linked lists can shrink or grow at any point in time easily.

Operations performed on Linked list


A linked list is a linear data structure where each node contains a value and a reference to the
next node. Here are some common operations performed on linked lists:

 Initialization: A linked list can be initialized by creating a head node with a reference to
the first node. Each subsequent node contains a value and a reference to the next node.
 Inserting elements: Elements can be inserted at the head, tail, or at a specific position in
the linked list.
 Deleting elements: Elements can be deleted from the linked list by updating the
reference of the previous node to point to the next node, effectively removing the
current node from the list.
 Searching for elements: Linked lists can be searched for a specific element by starting
from the head node and following the references to the next nodes until the desired
element is found.
 Updating elements: Elements in a linked list can be updated by modifying the value of a
specific node.
 Traversing elements: The elements in a linked list can be traversed by starting from the
head node and following the references to the next nodes until the end of the list is
reached.
 Reversing a linked list: The linked list can be reversed by updating the references of
each node so that they point to the previous node instead of the next node.

23
Applications of the Linked List
Different applications of linked lists are as follows:
 Linked lists are used to implement stacks, queues, graphs, etc.
 Linked lists are used to perform arithmetic operations on long integers.
 It is used for the representation of sparse matrices.
 It is used in the linked allocation of files.
 It helps in memory management.
 It is used in the representation of Polynomial Manipulation where each polynomial term
represents a node in the linked list.
 Linked lists are used to display image containers. Users can visit past, current, and next
images.
 They are used to store the history of the visited page.
 They are used to perform undo operations.
 Linked are used in software development where they indicate the correct syntax of a
tag.
 Linked lists are used to display social media feeds.

Real-Life Applications of a Linked List

 A linked list is used in Round-Robin scheduling to keep track of the turn in multiplayer
games.
 It is used in image viewer. The previous and next images are linked, and hence can be
accessed by the previous and next buttons.
 In a music playlist, songs are linked to the previous and next songs.

Stack Data Structure


Stack is a linear data structure that follows a particular order in which the operations are
performed. The order is LIFO (Last in first out). Entering and retrieving data is possible from
only one end. The entering and retrieving of data are also called push and pop operation in a
stack. There are different operations possible in a stack like reversing a stack using recursion,
Sorting, Deleting the middle element of a stack, etc.

24
Characteristics of a Stack
Stack has various different characteristics which are as follows:
 Stack is used in many different algorithms like Tower of Hanoi, tree traversal,
recursion, etc.
 Stack is implemented through an array or linked list.
 It follows the Last in First Out operation i.e., an element that is inserted first will pop in
last and vice versa.
 The insertion and deletion are performed at one end i.e. from the top of the stack.
 In stack, if the allocated space for the stack is full, and still, anyone attempts to add
more elements, it will lead to stack overflow.

Applications of Stack

Different applications of Stack are as follows:


 The stack data structure is used in the evaluation and conversion of arithmetic
expressions.
 It is used for parenthesis checking.
 While reversing a string, the stack is used as well.
 Stack is used in memory management.
 It is also used for processing function calls.
 The stack is used to convert expressions from infix to postfix.
 The stack is used to perform undo as well as redo operations in word processors.
 The stack is used in virtual machines like JVM.
 The stack is used in the media players. Useful to play the next and previous song.
 The stack is used in recursion operations.

Operation performed on Stack

A stack is a linear data structure that implements the Last-In-First-Out (LIFO) principle. Here
25
are some common operations performed on stacks:

 Push: Elements can be pushed onto the top of the stack, adding a new element to the top
of the stack.
 Pop: The top element can be removed from the stack by performing a pop operation,
effectively removing the last element that was pushed onto the stack.
 Peek: The top element can be inspected without removing it from the stack using a peek
operation.
 IsEmpty: A check can be made to determine if the stack is empty.

 Size: The number of elements in the stack can be determined using a size operation.

Real-Life Applications of Stack


 Real life example of a stack is the layer of eating plates arranged one above the other.
When you remove a plate from the pile, you can take the plate to the top of the pile. But
this is exactly the plate that was added most recently to the pile. If you want the plate at
the bottom of the pile, you must remove all the plates on top of it to reach it.
 Browsers use stack data structures to keep track of previously visited sites.
 Call log in mobile also uses stack data structure.

Queue Data Structure

26
Queue is a linear data structure that follows a particular order in which the operations are
performed. The order is First In First Out(FIFO) i.e. the data item stored first will be accessed
first. In this, entering and retrieving data is not done from only one end. An example of a queue
is any queue of consumers for a resource where the consumer that came first is served first.
Different operations are performed on a Queue like Reversing a Queue (with or without using
recursion), Reversing the first K elements of a Queue, etc. A few basic operations performed In
Queue are enqueue, dequeue, front, rear, etc.

Characteristics of a Queue
The queue has various different characteristics which are as follows: 
The queue is a FIFO (First In First Out) structure.
 To remove the last element of the Queue, all the elements inserted before the new
element in the queue must be removed.
 A queue is an ordered list of elements of similar data types.

Applications of Queue

Different applications of Queue are as follows:


 Queue is used for handling website traffic.
 It helps to maintain the playlist in media players.
 Queue is used in operating systems for handling interrupts.
 It helps in serving requests on a single shared resource, like a printer, CPU task
scheduling, etc.
 It is used in the asynchronous transfer of data e.g. pipes, file IO, and sockets.
 Queues are used for job scheduling in the operating system.
 In social media to upload multiple photos or videos queue is
used.
 To send an e-mail queue data structure is used.
 To handle website traffic at a time queues are used.
 In Windows operating system, to switch multiple applications

Operation performed on Queue


A queue is a linear data structure that implements the First-In-First-Out (FIFO) principle. Here
are some common operations performed on queues:
27
 Enqueue: Elements can be added to the back of the queue, adding a new element to the
end of the queue.
 Dequeue: The front element can be removed from the queue by performing a dequeue
operation, effectively removing the first element that was added to the queue.
 Peek: The front element can be inspected without removing it from the queue using a
peek operation.
 IsEmpty: A check can be made to determine if the queue is empty.

 Size: The number of elements in the queue can be determined using a size operation.

Real-Life Applications of Queue


 A real-world example of a queue is a single-lane one-way road, where the vehicle that
enters first will exit first.
 A more real-world example can be seen in the queue at the ticket windows.
 A cashier line in a store is also an example of a queue.
 People on an escalator

28
Tree Data Structure
A tree is a non-linear and hierarchical data structure where the elements are arranged in a tree-
like structure. In a tree, the topmost node is called the root node. Each node contains some data,
and data can be of any type. It consists of a central node, structural nodes, and sub-nodes which
are connected via edges. Different tree data structures allow quicker and easier access to the
data as it is a non-linear data structure. A tree has various terminologies like Node, Root, Edge,
Height of a tree, Degree of a tree, etc.

There are different types of Tree:


 Binary Tree,
 Binary Search Tree,
 AVL Tree,
 B-Tree, etc.

Characteristics of a Tree
The tree has various different characteristics which are as follows:
 A tree is also known as a Recursive data structure.
 In a tree, the Height of the root can be defined as the longest path from the root node
to the leaf node.
 In a tree, one can also calculate the depth from the top to any node. The root node
has a depth of 0.

Applications of Tree

Different applications of Tree are as follows:


 Heap is a tree data structure that is implemented using arrays and used to implement
priority queues.
 B-Tree and B+ Tree are used to implement indexing in databases.
 Syntax Tree helps in scanning, parsing, generation of code, and evaluation of
 arithmetic expressions in Compiler design.
 K-D Tree is a space partitioning tree used to organize points in K-dimensional
space.
 Spanning trees are used in routers in computer networks.
29
Operation performed on Tree

A tree is a non-linear data structure that consists of nodes connected by edges. Here are some
common operations performed on trees:

 Insertion: New nodes can be added to the tree to create a new branch or to increase
the height of the tree.
 Deletion: Nodes can be removed from the tree by updating the references of the
parent node to remove the reference to the current node.
 Search: Elements can be searched for in a tree by starting from the root node and
traversing the tree based on the value of the current node until the desired node is
found.
 Traversal: The elements in a tree can be traversed in several different ways, including
in-order, pre-order, and post-order traversal.
 Height: The height of the tree can be determined by counting the number of edges
from the root node to the furthest leaf node.
 Depth: The depth of a node can be determined by counting the number of edges from
the root node to the current node.
 Balancing: The tree can be balanced to ensure that the height of the tree is minimized
and the distribution of nodes is as even as possible.

Real-Life Applications of Tree

 In real life, tree data structure helps in Game Development.


 It also helps in indexing in databases.
 A Decision Tree is an efficient machine-learning tool, commonly used in decision
analysis. It has a flowchart-like structure that helps to understand data.  Domain
Name Server also uses a tree data structure.
 The most common use case of a tree is any social networking site.

Graph Data Structure


30
A graph is a non-linear data structure that consists of vertices (or nodes) and edges. It consists of a finite
set of vertices and set of edges that connect a pair of nodes. The graph is used to solve the most
challenging and complex programming problems. It has different terminologies which are Path, Degree,
Adjacent vertices, Connected components, etc.

Characteristics of Graph

The graph has various different characteristics which are as follows:


 The maximum distance from a vertex to all the other vertices is considered the Eccentricity of
that vertex.
 The vertex having minimum Eccentricity is considered the central point of the graph.  The
minimum value of Eccentricity from all vertices is considered the radius of a connected graph.

Applications of Graph

Different applications of Graphs are as follows:


 The graph is used to represent the flow of computation.
 It is used in modelling graphs.
 The operating system uses Resource Allocation Graph.
 Also used in the World Wide Web where the web pages represent the nodes.

Operations performed on Graph


A graph is a non-linear data structure consisting of nodes and edges. Here are some common
operations performed on graphs:

 Add Vertex: New vertices can be added to the graph to represent a new node.
 Add Edge: Edges can be added between vertices to represent a relationship between
nodes.
 Remove Vertex: Vertices can be removed from the graph by updating the references of
adjacent vertices to remove the reference to the current vertex.
 Remove Edge: Edges can be removed by updating the references of the adjacent
vertices to remove the reference to the current edge.
 Depth-First Search (DFS): A graph can be traversed using a depth-first search by

31
visiting the vertices in a depth-first manner.
 Breadth-First Search (BFS): A graph can be traversed using a breadth-first search by
visiting the vertices in a breadth-first manner.
 Shortest Path: The shortest path between two vertices can be determined using
algorithms such as Dijkstra’s algorithm or A* algorithm.
 Connected Components: The connected components of a graph can be determined by
finding sets of vertices that are connected to each other but not to any other vertices in
the graph.
 Cycle Detection: Cycles in a graph can be detected by checking for back edges during a
depth-first search.

These are some of the most common operations performed on graphs. The specific operations
and algorithms used may vary based on the requirements of the problem and the programming
language used. Graphs are commonly used in applications such as computer networks, social
networks, and routing problems.

Real-Life Applications of Graph


 One of the most common real-world examples of a graph is Google Maps where cities
are located as vertices and paths connecting those vertices are located as edges of the
graph.
 A social network is also one real-world example of a graph where every person on the
network is a node, and all of their friendships on the network are the edges of the graph.
 A graph is also used to study molecules in physics and chemistry.

Tools & Technologies Used

 C
 C is a general-purpose programming language developed by Dennis Ritchie at Bell Labs between
1969 and 1972. It is a procedural language that supports structured programming and is known
32
for its efficiency, portability, and flexibility. C is widely used for system programming, including
operating systems, device drivers, and embedded systems. It is also used for a variety of other
applications, including web development, scientific computing, and game development.

 C++
 C++ is a general-purpose programming language created by Bjarne Stroustrup as an extension to
the C language. It is a compiled language that supports object-oriented programming, generic
programming, and exception handling. C++ is widely used for system programming, game
development, embedded systems, and scientific computing. It is known for its efficiency,
portability, and flexibility.

Reference

Data structures can be found in various computer science textbooks and online resources.
33
Some popular texts include:
1. “Introduction to Algorithms” by Thomas H. Carmen, Charles E. Leiser son, Ronald L.
Rivest, and Clifford Stein.
2. “Data Structures and Algorithm Analysis in Java” by Mark Allen Weiss. 3.
“The Algorithm Design Manual” by Steven S. Skeena.
4. Online resources such as Coursera, Udemy, and Khan Academy also offer courses on data
structures and algorithms.

Conclusion

Although these are the most widely known and used data structures, there are some other forms
of data structures as well which are used in Computer Science, such as policy-based data
structures, etc. But no matter which data structure you choose, each one has its perks and
disadvantages, without the knowledge of which, it can be very costly to choose the wrong type
of data structure. So, it is very important to understand the need of the situation, and then decide
which kind of data structure suits best for the job.

34

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