0% found this document useful (0 votes)
3 views7 pages

Programming & Algorithm

An algorithm is a defined procedure that processes input to produce output, serving to solve specific problems. Programming involves designing and maintaining software through various programming languages. The document outlines everyday and mathematical algorithms, as well as common sorting and searching algorithms used for data organization and retrieval.

Uploaded by

loisejrkeys
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)
3 views7 pages

Programming & Algorithm

An algorithm is a defined procedure that processes input to produce output, serving to solve specific problems. Programming involves designing and maintaining software through various programming languages. The document outlines everyday and mathematical algorithms, as well as common sorting and searching algorithms used for data organization and retrieval.

Uploaded by

loisejrkeys
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

PROGRAMMING &

ALGORITHM
ENGR. JOYCE C. BERNADOS, IE,MAED-AS,LPT,(RES) PA
WHAT IS ALGORITHM?

 An algorithm is a well-defined procedure


that takes some input and produces a
corresponding output. It's a set of
instructions that is used to solve a specific
problem or perform a particular task.
What is Programming?
 Programming is the process of
designing, writing, testing,
debugging and maintaining
software programs using
programming languages.
 Everyday Life Algorithms
Recipe Algorithm:
 Input: Ingredients (flour, sugar, eggs, etc.)
 Steps: Mix, bake, decorate
 Output: A delicious cake!
Getting Ready for Work Algorithm:
 Input: Wake-up time, work schedule
 Steps: Wake up, brush teeth, shower, dress, have breakfast
 Output: Being ready for work on time!
Mathematical Algorithms
 Addition Algorithm:
 Input: Two numbers (a, b)
 Steps: Add a and b
 Output: The sum of a and b
Algorithm: Find Maximum of Two Numbers

 Input: a, b (two numbers)

 1. If a > b then
 2. max = a
 3. Else
 4. max = b
 5. Return max
Here are some common sets of algorithms used to solve
various problems:
 1. Sorting Algorithms
 Bubble Sort
 Selection Sort
 Insertion Sort
 Merge Sort
 Quick Sort
 Heap Sort
 Used for: Arranging data in ascending or descending
order.
2. Searching Algorithms
 Linear Search
 Binary Search
 Depth-First Search (DFS)
 Breadth-First Search (BFS)
 Used for: Finding specific data
within a dataset.

You might also like