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

Data Structure

The document discusses two common data structures - stack and queue. It defines them as linear data structures that follow particular orders for operations. A stack follows LIFO (last in, first out) order, where the last element inserted is the first to be removed. A queue follows FIFO (first in, first out) order, where elements are inserted at one end and removed from the other end, with the first element inserted being the first removed. Several real-world applications that use each data structure are provided as examples.
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)
14 views

Data Structure

The document discusses two common data structures - stack and queue. It defines them as linear data structures that follow particular orders for operations. A stack follows LIFO (last in, first out) order, where the last element inserted is the first to be removed. A queue follows FIFO (first in, first out) order, where elements are inserted at one end and removed from the other end, with the first element inserted being the first removed. Several real-world applications that use each data structure are provided as examples.
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/ 7

DATA STRUCTURE

Sarna Fathima A
DATA STRUCTURE

● data structure is a specialized format for organizing, processing,


retrieving and storing data. There are several basic and advanced
types of data structures, all designed to arrange data to suit a
specific purpose. Data structures make it easy for users to access
and work with the data they need in appropriate ways.
Realtime
Converting infix to postfix expressions.

Undo/Redo button/operation in word processors.


Application for Syntaxes in languages are parsed using stacks.
Stack It is used in many virtual machines like JVM.

Forward-backward surfing in the browser.

History of visited websites.

Message logs and all messages you get are arranged


in a stack.

Call logs, E-mails, Google photos’ any gallery,


Stack

● 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.
Realtime
● Operating System uses queues for job
scheduling.

Application for ● To handle congestion in the networking queue


can be used.

Queue ● Data packets in communication are arranged in


queue format.
● Sending an e-mail, it will be queued.
● Server while responding to request
● Uploading and downloading photos, first kept
for uploading/downloading will be completed
first (Not if there is threading)
● Most internet requests and processes use
queue.
Queue

● Queue, like Stack, is also an abstract data structure. The thing that makes
queue different from stack is that a queue is open at both its ends. Hence, it
follows FIFO (First-In-First-Out) structure, i.e. the data item inserted first will
also be accessed first. The data is inserted into the queue through one end and
deleted from it using the other end.
Examples

You might also like