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

Algorithms Lecture 01

Uploaded by

18-QADEER AHMAD
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views

Algorithms Lecture 01

Uploaded by

18-QADEER AHMAD
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 29

Algorithms

Lecture # 01
Preliminaries
Origin of Word: ALGORITHM
Origin of Word: ALGORITHM
Origin of Word: ALGORITHM
Origin of Word: ALGORITHM
ALGORITHM informal definition
definition
 Algorithm consists of well defined steps,
executed in particular order to solve a
computing problem
 Any computing problem can be solved by
executing a series of actions in a specific
order, that is called algorithm
definition

Algorithm is a function or procedure


Which takes an input and produces some output
ALGORITHM, programming
ALGORITHM, programming
Why Study?
 Data structures was about how to dealt with
good data structures.
 Fastest algorithms are fast because they use
fastest data structures
Why Study?
Why Study?
Why Study?
Course outline
Course outline
Course outline
Course outline
Criteria for analyzing Algorithms
Criteria for analyzing Algorithms
Algorithm Writing..

 Itshould be language independent


 Algorithm can be written in any manner
unless they provide the solution of a
problem
 Two styles are normally used
 Pseudo-code
 Flow Chart
Algorithms (Pseudo-code
Algorithms (Flowchart)
Algorithms (Code)
 void bubbleSort(int Size, number[]){
 for(int i=0;i<Size-1;i++){
 for(int j=0;j<Size-1;j++){
 if(number[j]<number[j+1]){
 int temp=number[j];
 number[j]=number[j+1];
 number[j+1]=temp;
 }
 }
}
Model of Computation
Model of Computation
Model of Computation
Random Access Machine

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