0% found this document useful (0 votes)
2 views19 pages

Presentation 1

For reporting and helping students and other materials that u need
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views19 pages

Presentation 1

For reporting and helping students and other materials that u need
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 19

DATA STRUCTURES

AND ALGORITHMS
01 What is Data Structure

02 What is Algorithms

03 Linear vs Non-Linear

Agenda 04 Stack Data Structure

Overview 05 C++ Stack


06 Queue Data Structure

07 C++ Queue

Agenda 08 Circular Queue

Overview
DATA
It is a collection of numbers, symbols, or
characters.

It is raw and unorganized.

INFORMATION
An organized collection of data that is arranged
meaningfully.
Data Structure
It is a data organization, management, and storage
format that enables efficient access and modification.

It is a way in which data is stored on a device.

Why Do We Need Data


Structures? So that we can Store Data in a particular
situation efficiently and use our resources in the
most productive way possible.
Real World Application
Dictionary Supermarket Map

• Stored Alphabetically • Stored Categorically • Stored Coordinates


• Efficient Searching • Efficient Searching • Efficient Searching
Variables
Temporary storage for data which is stored in
our RAM.

Array/Collections
• A data structure that contains a group of values/variables can be
accessed by using an index.

• In most cases, their values are of the Same Datatype.

• They are commonly used to organize data to sort or search.


PROGRAMMING APPLICATION
Array in C++ WITHOUT SORTING.

Assume that it takes 1 second for each element to be read

Let’s search for “RM-101” by iterating the array


PROGRAMMING APPLICATION
Array in C++ WITH SORTING.

Let’s search for “RM-101” by iterating the array


Let’s search for “RM-103” by iterating the array from the end
CONCLUSION

The main goal of data structures and algorithms is


to minimize the time consumed in searching,
sorting, and writing data in our system.
ALGORITHM
A set of instructions designed to perform a specific task.

Programming can be as simple as performing math operations to


complicated operations.

Algorithms are different from actual Implementation.


Algorithm Characteristics
• INPUT - 0 or More Inputs
• OUTPUT - 1 or More Outputs
• UNAMBIGUITY - Clear and Simple
• FINITENESS - Limited Instructions
• EFFECTIVENESS - Impact of every Step

algorithm flow
• INPUT - Needed Values
• PROCESS - Operations
• OUTPUT - Result
Real World Algorithm
Algorithm of Cooking Pancit Canton
1.Boil Water
2.Put Noodles in the Boiling Water.
3.Prepare the Sauce on a Plate.
4.Drain the Boiling Water
5.Put the Noodles in The Sauce
6.Stir until the Noodles is covered with the
Sauce
7.Serve Pancit Canton
PROGRAMMING ALGORITHM
Create an Algorithm that Adds Two Numbers
PROGRAMMING
IMPLEMENTATION
Create an Algorithm that Adds Two Numbers
ALGORITHMS and DATA
STRUCTURE
Data Structures are sets of algorithms that organize data in
a certain way.
ALGORITHMS COMPLEXITY
An Algorithm's Performance is measured by

• Time Complexity
Represents the amount of time the algorithm needs for it to
be completed.

• Space Complexity
Represents the amount of memory needed for the
algorithm in its process.
SPACE COMPLEXITY
There are plenty of factors to consider in Space Complexity.

• Instruction Space
The size of a program's executable file varies depending on the number of
lines of code.

• Data Space
The size required to store variables and constants.

• Environment Space
The size required to store environment information to resume a function.
Timmerman Industries

Thank You
02 May, 2024

You might also like