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

281710lecture Notes 3-Applications of Data Structures-1718434458689

Lecture notes data structure

Uploaded by

praksh6377
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views

281710lecture Notes 3-Applications of Data Structures-1718434458689

Lecture notes data structure

Uploaded by

praksh6377
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Data Structures and Algorithms

LECTURE 3 NOTES

Applications of Data Structures


● Real-time Applications of Data Structures

A data structure is a method of organizing data in a computer that allows it to be used


effectively. The real-time applications of all data structures are discussed in this article.

Application of Arrays:

Arrays are the most basic data structures, storing items of the same data type. As a basic
application, arrays can be used to store data in tabular format. If we want to save our contacts
on our phones, for example, the software will simply place all of our contacts in an array.

Some other applications of the arrays are:

1. The leaderboard of a game can be easily arranged using arrays to store the scores and
arrange them in descending order to clearly show the rank of each player in the game.

2. A simple question paper is an array of numbered questions, each with its own set of
marks.

3. In image processing, 2D arrays, also known as matrices, are used.

4. It is also used in speech processing, where each speech signal is represented by an


array.

5. Your monitor is a multidimensional array of pixels as well.

6. Book titles in a library management system.

7. Online ticket booking.

8. Mobile phone contacts.

9. For computer CPU scheduling.

10. To record the possible chess moves on a chessboard.

11. To save images of a certain size on an android device or laptop.

String application:

1. spam email detection

2. Detection of plagiarism.

3. The search engine

4. System for digital forensics and information retrieval.

5. Spelling checkers
6. To validate the user's information in the database.

Matrix:

A matrix is an ordered collection of elements in columns and rows. The elements of a matrix
must be enclosed within brackets.

Some applications of matrix are:

1. Matrixes are used in geology to create seismic surveys.

2. Used for graphing and statistics, as well as scientific studies and research in a variety
of fields.

3. Matrices are also used to represent real-world data such as the population, infant
mortality rate, and so on.

4. They are the most effective survey representation methods.

5. In science optics, for refraction and reflection.

6. Quantum physics and electronic circuits

7. The media player

8. Email distribution list

9. Creating a symbol table

Linked List's:

A linked list is a sequence data structure, which connects elements, called nodes, through
links.

Some applications of the linked list are:

1. Images are linked to each other. As a result, image viewer software employs a linked
list to display the previous and next images via the previous and next buttons.

2. The previous and next URL links, which are linked using a linked list, can be used to
access web pages.

3. Music players use the same technique to switch between tracks.


4. A circular linked list is used to keep track of turns in a multiplayer game.

5. MS-Paint drawings and shapes are linked together using a linked list on canvas.

6. Escalators ‒ Circular linked List.

7. Internally, each line of code in an IDE is a record on a doubly-linked list.

8. Tinder's left/right swipe uses a doubly-linked list.

9. "Feeds" of social media content

10. Used for symbol table management in a designing compiler.

11. Used in switching between applications and programs (Alt + Tab) in the Operating
system (implemented using Circular Linked List).

12. Train coaches are linked to one another using a doubly-linked list.

13. It is used to implement Stacks, Queues, Graphs, and Trees.

14. To carry out an undo operation.

15. Back button [LIFO]

16. Syntax in the coding editor.

17. History of pages visited.

Stack:

A stack is a data structure that uses LIFO order.

Some applications of a stack are:

1. Converting infix expressions to postfix expressions

2. In word processors, the undo/redo button/operation

3. Stacks are used to parse language syntax.

4. It is used in many virtual machines, such as the JVM.

5. In the browser, you can move forward and backward.

6. Websites visited in the past.

7. Message logs and all messages received are stored in a stack.

8. Call logs, e-mails, any gallery of Google photos, YouTube downloads, and notifications
(the latest appears first ).
9. After completing a Google Pay/Paytm transaction, you will receive a scratch card.

10. Wearing/Removing Bangles, Dinner Plate Pile, Stacked Chairs

11. On a cold evening, changing wearables, first in, last out.

12. Last Hired, First Fired - which is commonly used when a company reduces its
workforce during an economic downturn.

13. Loading bullets into a gun's magazine. The last one in gets fired first. Bam!

14. Virtual Machine in Java.

15. Recursion.

16. Used in IDEs to check for proper parentheses matching


17. Media playlist to play the previous and next song.

Queue:

A queue is a data structure that uses FIFO order.

Some applications of a queue are:

1. Queues are used by the operating system to schedule jobs.

2. The networking queue can be used to handle congestion.

3. In communication, data packets are organised in a queue format.

4. When you send an email, it will be queued.

5. While responding to a request, the server

6. Photos that have been saved for uploading/downloading will be completed first (not if
there is threading).

7. The majority of internet requests and processes use a queue.

8. Windows employs a circular queue when switching between applications.

9. In the queues for escalators, printer spoolers, and car washes.

10. A circular queue is used in a game to maintain the playing sequence of multiple
players.

11. There are three types of queues: linked list-based queues, array-based queues, and
stack-based queues.

12. Photos that have been saved for uploading/downloading will be completed first (not if
there is threading).
13. Handle website traffic

14. CPU scheduling

Priority Queue:

1. Process scheduling in the kernel.

2. Priority queues are used in file downloading operations in a browser

3. Vehicle at the toll center

Application of Sorting Algorithms

1. Sorting Algorithms in Action

2. Sort items by their monetary value

3. Databases on the backend (Merge Sort)

4. Card games with your friends (Insertion Sort)

5. sort() - faster than qsort because it uses IntroSort (a hybrid of Quicksort, Heapsort,
and Insertion Sort) ()

6. The phone's contact list

7. Online purchasing - To sort prices into different price ranges. Flipkart and Amazon are
two examples

Graph:

A graph is a data structure where data is stored in a collection of interconnected vertices


(nodes) and edges (paths)

Some applications of a graph are:

1. Facebook’s Graph API uses the structure of graphs

2. Google’s Knowledge Graph also has something to do with graphs

3. Dijkstra algorithm, or the shortest path first algorithm, also uses graph structure to
find the smallest path between the nodes of the graph

4. The GPS navigation system also uses shortest path APIs

5. Networking components have a huge application for graphs

6. Facebook, Instagram, and all social media networking sites, every user is a node
7. Data organization

8. React’s virtual DOM uses graph data structures

9. MS Excel uses DAG (Directed Acyclic Graphs)

10. Path Optimization Algorithms, BFS, DFS

11. Recommendation Engines

12. Scientific Computations, Flight Networks, Page ranking

13. Google Maps to find the nearest location

14. Facebook to suggest mutual friends

Tree:

Trees are hierarchical structures having a single root node.

Some applications of trees are:

1. The XML Parser employs tree algorithms

2. In machine learning, the decision-based algorithm is used, which is based on the tree
algorithm

3. Tree data structures are also used in databases for indexing

4. Tree structures are also used by domain name servers (DNS)

5. File explorer/mobile computer/any computer BST is used in computer graphics

6. When you post a question on a website like Quora, the comments are a child of the
question

7. Parsers (XML parser)

8. Compression of code (zip)

9. The DOM in HTML

10. Analyze an expression (i.e., parse)

11. Component of compiler/automata theory

12. To keep track of the possible moves in a chess game

13. To save biological species' genealogy information


14. JVM (Java Virtual Machine) uses this to store Java objects

Application of the Binary Search Tree:

1. D Game Engine.

2. Computer Graphics Rendering.

3. Routing table

You might also like