SlideShare a Scribd company logo
Linear Search
Presentation on
Submitted by:
Markajul Hasnain Alif
ID: 161-35-139
Contents
Definitions (Data, Structure, Data Structure, Search, Linear
search)
Example
Pseudocode
Advantages and disadvantages
Discussion
And Sources
Linear Search
Presentation on
What is data?
Data is a collection of facts, such as numbers, words,
measurements, observations or even just descriptions
of things.
Linear Search
Presentation on
What is
structure?
The arrangement of and relations between the parts or
elements of something complex.
Linear Search
Presentation on
What is data
structure?
data structure is a specialized format for organizing
and storing data.
Linear Search
Presentation on
What is search?
Search is the process of looking for something.
Linear Search
Presentation on
What is linear
search?
linear search or sequential search is a method for
finding a target value within a list. It sequentially checks
each element of the list for the target value until a
match is found or until all the elements have been
searched.
Linear Search
Presentation on
Linear search
example
If you are asked to find the name of the person having
phone number say “1234” with the help of a telephone
directory.
Since telephone directory is sorted by name not by
numbers,we have to go through each and every
number of the directory
Linear Search
Presentation on
Pseudocode
For all elements
Check if it is equal to element being searched
for.
If it is, return its position.
else continue.
Linear Search
Presentation on
Example
Linear Search
Presentation on
Advantages
⦿ If the first number in the directory is the number you were
searching for ,then lucky you!!.
⦿ Since you have found it on the very first page,now its not
important for you that how many pages are there in the
directory.
⦿ Whether if it is of 1000 pages or 2000 pages it will take u
same time to find you the number ,if it is at the very
beginning .
.
Linear Search
Presentation on
Disadvantages
⦿ It may happen that the number you are searching for is the
last number of directory or if it is not in the directory at all.
⦿ In that case you have to search the whole directory.
⦿ Now number of elements will matter to you.if there are 500
pages ,you have to search 500;if it has 1000 you have to
search 1000.
Linear Search
Presentation on
Discussion
⦿ Sorted array is not needed.
⦿ Works fine for small number of elements .Search
time increases with number of elements.
⦿ Elements with higher probability of being searched
should be kept in the beginning.
Linear Search
Presentation on
Sources
Google.com
Wikipedia.org
Slideshare.net
www.cse.ust.hk
hellohasan.com
Linear Search
Presentation on
Thank you all.
Linear Search
Presentation on

More Related Content

What's hot

linear search and binary search
linear search and binary searchlinear search and binary search
linear search and binary search
Zia Ush Shamszaman
 
SEARCHING AND SORTING ALGORITHMS
SEARCHING AND SORTING ALGORITHMSSEARCHING AND SORTING ALGORITHMS
SEARCHING AND SORTING ALGORITHMS
Gokul Hari
 
linked list in data structure
linked list in data structure linked list in data structure
linked list in data structure
shameen khan
 
Searching techniques in Data Structure And Algorithm
Searching techniques in Data Structure And AlgorithmSearching techniques in Data Structure And Algorithm
Searching techniques in Data Structure And Algorithm
03446940736
 
Binary search
Binary searchBinary search
Binary search
AparnaKumari31
 
Binary Search Tree
Binary Search TreeBinary Search Tree
Binary Search Tree
sagar yadav
 
Insertion Sorting
Insertion SortingInsertion Sorting
Insertion Sorting
FarihaHabib123
 
Hashing
HashingHashing
Hashing
Amar Jukuntla
 
Quick sort-Data Structure
Quick sort-Data StructureQuick sort-Data Structure
Quick sort-Data Structure
Jeanie Arnoco
 
stack & queue
stack & queuestack & queue
stack & queue
manju rani
 
1.1 binary tree
1.1 binary tree1.1 binary tree
1.1 binary tree
Krish_ver2
 
Linear Search
Linear SearchLinear Search
Linear Search
SWATHIR72
 
Bubble sort
Bubble sortBubble sort
Bubble sort
Manek Ar
 
Binary Search - Design & Analysis of Algorithms
Binary Search - Design & Analysis of AlgorithmsBinary Search - Design & Analysis of Algorithms
Binary Search - Design & Analysis of Algorithms
Drishti Bhalla
 
Tree - Data Structure
Tree - Data StructureTree - Data Structure
Tree - Data Structure
Ashim Lamichhane
 
Searching
SearchingSearching
Searching
Ashim Lamichhane
 
Insertion sort
Insertion sortInsertion sort
Insertion sortMYER301
 
Queue ppt
Queue pptQueue ppt
Queue ppt
SouravKumar328
 
Binary search in data structure
Binary search in data structureBinary search in data structure
Binary search in data structure
Meherul1234
 
Selection sorting
Selection sortingSelection sorting
Selection sorting
Himanshu Kesharwani
 

What's hot (20)

linear search and binary search
linear search and binary searchlinear search and binary search
linear search and binary search
 
SEARCHING AND SORTING ALGORITHMS
SEARCHING AND SORTING ALGORITHMSSEARCHING AND SORTING ALGORITHMS
SEARCHING AND SORTING ALGORITHMS
 
linked list in data structure
linked list in data structure linked list in data structure
linked list in data structure
 
Searching techniques in Data Structure And Algorithm
Searching techniques in Data Structure And AlgorithmSearching techniques in Data Structure And Algorithm
Searching techniques in Data Structure And Algorithm
 
Binary search
Binary searchBinary search
Binary search
 
Binary Search Tree
Binary Search TreeBinary Search Tree
Binary Search Tree
 
Insertion Sorting
Insertion SortingInsertion Sorting
Insertion Sorting
 
Hashing
HashingHashing
Hashing
 
Quick sort-Data Structure
Quick sort-Data StructureQuick sort-Data Structure
Quick sort-Data Structure
 
stack & queue
stack & queuestack & queue
stack & queue
 
1.1 binary tree
1.1 binary tree1.1 binary tree
1.1 binary tree
 
Linear Search
Linear SearchLinear Search
Linear Search
 
Bubble sort
Bubble sortBubble sort
Bubble sort
 
Binary Search - Design & Analysis of Algorithms
Binary Search - Design & Analysis of AlgorithmsBinary Search - Design & Analysis of Algorithms
Binary Search - Design & Analysis of Algorithms
 
Tree - Data Structure
Tree - Data StructureTree - Data Structure
Tree - Data Structure
 
Searching
SearchingSearching
Searching
 
Insertion sort
Insertion sortInsertion sort
Insertion sort
 
Queue ppt
Queue pptQueue ppt
Queue ppt
 
Binary search in data structure
Binary search in data structureBinary search in data structure
Binary search in data structure
 
Selection sorting
Selection sortingSelection sorting
Selection sorting
 

Viewers also liked

Data Structures - Searching & sorting
Data Structures - Searching & sortingData Structures - Searching & sorting
Data Structures - Searching & sorting
Kaushal Shah
 
Linear Search & Binary Search
Linear Search & Binary SearchLinear Search & Binary Search
Linear Search & Binary Search
Reem Alattas
 
Chapter 11 - Sorting and Searching
Chapter 11 - Sorting and SearchingChapter 11 - Sorting and Searching
Chapter 11 - Sorting and Searching
Eduardo Bergavera
 
Data structure
Data structureData structure
Data structure
M Ramya
 
Binary search
Binary searchBinary search
Binary search
ronit gaikwad
 
Linear and binary search
Linear and binary searchLinear and binary search
Linear and binary search
Arjunsinh Jadeja
 
Searching linear & binary search
Searching linear & binary searchSearching linear & binary search
Searching linear & binary search
nikunjandy
 
Linear and Bianry search
Linear and Bianry searchLinear and Bianry search
Linear and Bianry search
Daffodil International University
 
Binary search
Binary search Binary search
Binary search Raghu nath
 
Binary search
Binary searchBinary search
Binary search
Gaurav Solanki
 
2. Linear Data Structure Using Arrays - Data Structures using C++ by Varsha P...
2. Linear Data Structure Using Arrays - Data Structures using C++ by Varsha P...2. Linear Data Structure Using Arrays - Data Structures using C++ by Varsha P...
2. Linear Data Structure Using Arrays - Data Structures using C++ by Varsha P...
widespreadpromotion
 
Sorting Algorithms
Sorting AlgorithmsSorting Algorithms
Sorting Algorithms
Mohammed Hussein
 
Sorting Algorithms
Sorting AlgorithmsSorting Algorithms
Sorting Algorithmsmultimedia9
 
9. Searching & Sorting - Data Structures using C++ by Varsha Patil
9. Searching & Sorting - Data Structures using C++ by Varsha Patil9. Searching & Sorting - Data Structures using C++ by Varsha Patil
9. Searching & Sorting - Data Structures using C++ by Varsha Patil
widespreadpromotion
 

Viewers also liked (15)

Data Structures - Searching & sorting
Data Structures - Searching & sortingData Structures - Searching & sorting
Data Structures - Searching & sorting
 
Linear Search & Binary Search
Linear Search & Binary SearchLinear Search & Binary Search
Linear Search & Binary Search
 
Chapter 11 - Sorting and Searching
Chapter 11 - Sorting and SearchingChapter 11 - Sorting and Searching
Chapter 11 - Sorting and Searching
 
Data structure
Data structureData structure
Data structure
 
Linear search
Linear searchLinear search
Linear search
 
Binary search
Binary searchBinary search
Binary search
 
Linear and binary search
Linear and binary searchLinear and binary search
Linear and binary search
 
Searching linear & binary search
Searching linear & binary searchSearching linear & binary search
Searching linear & binary search
 
Linear and Bianry search
Linear and Bianry searchLinear and Bianry search
Linear and Bianry search
 
Binary search
Binary search Binary search
Binary search
 
Binary search
Binary searchBinary search
Binary search
 
2. Linear Data Structure Using Arrays - Data Structures using C++ by Varsha P...
2. Linear Data Structure Using Arrays - Data Structures using C++ by Varsha P...2. Linear Data Structure Using Arrays - Data Structures using C++ by Varsha P...
2. Linear Data Structure Using Arrays - Data Structures using C++ by Varsha P...
 
Sorting Algorithms
Sorting AlgorithmsSorting Algorithms
Sorting Algorithms
 
Sorting Algorithms
Sorting AlgorithmsSorting Algorithms
Sorting Algorithms
 
9. Searching & Sorting - Data Structures using C++ by Varsha Patil
9. Searching & Sorting - Data Structures using C++ by Varsha Patil9. Searching & Sorting - Data Structures using C++ by Varsha Patil
9. Searching & Sorting - Data Structures using C++ by Varsha Patil
 

Similar to Linear Search Presentation

Linear Search in Oops.pptx
Linear Search in Oops.pptxLinear Search in Oops.pptx
Linear Search in Oops.pptx
Ashish Sadavarti
 
Slideshare pres
Slideshare presSlideshare pres
Slideshare presTaryn Pahl
 
RA Slideshare Presentation- Taryn Pahl
RA Slideshare Presentation- Taryn PahlRA Slideshare Presentation- Taryn Pahl
RA Slideshare Presentation- Taryn PahlTaryn Pahl
 
NLP& Bigdata. Motivation and Action
NLP& Bigdata. Motivation and ActionNLP& Bigdata. Motivation and Action
NLP& Bigdata. Motivation and ActionSarath P R
 
Proposal
ProposalProposal
arrays in c
arrays in carrays in c
arrays in c
vidhi mehta
 
binary_search
binary_searchbinary_search
binary_search
Mohamed Elsayed
 
Google Is a Two Page Site
Google Is a Two Page SiteGoogle Is a Two Page Site
Google Is a Two Page Site
Martina Helene Welander
 
Martina Welander - Google is a two pagesite
Martina Welander - Google is a two pagesiteMartina Welander - Google is a two pagesite
Martina Welander - Google is a two pagesite
NordicSitecoreConference
 
Introduction To Data Structures
Introduction To Data StructuresIntroduction To Data Structures
Introduction To Data Structures
Spotle.ai
 
Kasenchak "What Is Semantic Search? And Why Is It Important?"
Kasenchak "What Is Semantic Search? And Why Is It Important?"Kasenchak "What Is Semantic Search? And Why Is It Important?"
Kasenchak "What Is Semantic Search? And Why Is It Important?"
National Information Standards Organization (NISO)
 
Sequential & binary, linear search
Sequential & binary, linear searchSequential & binary, linear search
Sequential & binary, linear search
montazur420
 
Searching in c language
Searching in c languageSearching in c language
Searching in c language
CHANDAN KUMAR
 

Similar to Linear Search Presentation (13)

Linear Search in Oops.pptx
Linear Search in Oops.pptxLinear Search in Oops.pptx
Linear Search in Oops.pptx
 
Slideshare pres
Slideshare presSlideshare pres
Slideshare pres
 
RA Slideshare Presentation- Taryn Pahl
RA Slideshare Presentation- Taryn PahlRA Slideshare Presentation- Taryn Pahl
RA Slideshare Presentation- Taryn Pahl
 
NLP& Bigdata. Motivation and Action
NLP& Bigdata. Motivation and ActionNLP& Bigdata. Motivation and Action
NLP& Bigdata. Motivation and Action
 
Proposal
ProposalProposal
Proposal
 
arrays in c
arrays in carrays in c
arrays in c
 
binary_search
binary_searchbinary_search
binary_search
 
Google Is a Two Page Site
Google Is a Two Page SiteGoogle Is a Two Page Site
Google Is a Two Page Site
 
Martina Welander - Google is a two pagesite
Martina Welander - Google is a two pagesiteMartina Welander - Google is a two pagesite
Martina Welander - Google is a two pagesite
 
Introduction To Data Structures
Introduction To Data StructuresIntroduction To Data Structures
Introduction To Data Structures
 
Kasenchak "What Is Semantic Search? And Why Is It Important?"
Kasenchak "What Is Semantic Search? And Why Is It Important?"Kasenchak "What Is Semantic Search? And Why Is It Important?"
Kasenchak "What Is Semantic Search? And Why Is It Important?"
 
Sequential & binary, linear search
Sequential & binary, linear searchSequential & binary, linear search
Sequential & binary, linear search
 
Searching in c language
Searching in c languageSearching in c language
Searching in c language
 

Recently uploaded

standardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghhstandardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghh
ArpitMalhotra16
 
Innovative Methods in Media and Communication Research by Sebastian Kubitschk...
Innovative Methods in Media and Communication Research by Sebastian Kubitschk...Innovative Methods in Media and Communication Research by Sebastian Kubitschk...
Innovative Methods in Media and Communication Research by Sebastian Kubitschk...
correoyaya
 
一比一原版(TWU毕业证)西三一大学毕业证成绩单
一比一原版(TWU毕业证)西三一大学毕业证成绩单一比一原版(TWU毕业证)西三一大学毕业证成绩单
一比一原版(TWU毕业证)西三一大学毕业证成绩单
ocavb
 
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
NABLAS株式会社
 
一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单
enxupq
 
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
axoqas
 
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
nscud
 
Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)
TravisMalana
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP
 
Ch03-Managing the Object-Oriented Information Systems Project a.pdf
Ch03-Managing the Object-Oriented Information Systems Project a.pdfCh03-Managing the Object-Oriented Information Systems Project a.pdf
Ch03-Managing the Object-Oriented Information Systems Project a.pdf
haila53
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
ewymefz
 
Best best suvichar in gujarati english meaning of this sentence as Silk road ...
Best best suvichar in gujarati english meaning of this sentence as Silk road ...Best best suvichar in gujarati english meaning of this sentence as Silk road ...
Best best suvichar in gujarati english meaning of this sentence as Silk road ...
AbhimanyuSinha9
 
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
nscud
 
一比一原版(BU毕业证)波士顿大学毕业证成绩单
一比一原版(BU毕业证)波士顿大学毕业证成绩单一比一原版(BU毕业证)波士顿大学毕业证成绩单
一比一原版(BU毕业证)波士顿大学毕业证成绩单
ewymefz
 
Investigate & Recover / StarCompliance.io / Crypto_Crimes
Investigate & Recover / StarCompliance.io / Crypto_CrimesInvestigate & Recover / StarCompliance.io / Crypto_Crimes
Investigate & Recover / StarCompliance.io / Crypto_Crimes
StarCompliance.io
 
一比一原版(QU毕业证)皇后大学毕业证成绩单
一比一原版(QU毕业证)皇后大学毕业证成绩单一比一原版(QU毕业证)皇后大学毕业证成绩单
一比一原版(QU毕业证)皇后大学毕业证成绩单
enxupq
 
Q1’2024 Update: MYCI’s Leap Year Rebound
Q1’2024 Update: MYCI’s Leap Year ReboundQ1’2024 Update: MYCI’s Leap Year Rebound
Q1’2024 Update: MYCI’s Leap Year Rebound
Oppotus
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP
 
The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...
jerlynmaetalle
 
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
Tiktokethiodaily
 

Recently uploaded (20)

standardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghhstandardisation of garbhpala offhgfffghh
standardisation of garbhpala offhgfffghh
 
Innovative Methods in Media and Communication Research by Sebastian Kubitschk...
Innovative Methods in Media and Communication Research by Sebastian Kubitschk...Innovative Methods in Media and Communication Research by Sebastian Kubitschk...
Innovative Methods in Media and Communication Research by Sebastian Kubitschk...
 
一比一原版(TWU毕业证)西三一大学毕业证成绩单
一比一原版(TWU毕业证)西三一大学毕业证成绩单一比一原版(TWU毕业证)西三一大学毕业证成绩单
一比一原版(TWU毕业证)西三一大学毕业证成绩单
 
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
 
一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单
 
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
 
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
 
Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
 
Ch03-Managing the Object-Oriented Information Systems Project a.pdf
Ch03-Managing the Object-Oriented Information Systems Project a.pdfCh03-Managing the Object-Oriented Information Systems Project a.pdf
Ch03-Managing the Object-Oriented Information Systems Project a.pdf
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
 
Best best suvichar in gujarati english meaning of this sentence as Silk road ...
Best best suvichar in gujarati english meaning of this sentence as Silk road ...Best best suvichar in gujarati english meaning of this sentence as Silk road ...
Best best suvichar in gujarati english meaning of this sentence as Silk road ...
 
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
 
一比一原版(BU毕业证)波士顿大学毕业证成绩单
一比一原版(BU毕业证)波士顿大学毕业证成绩单一比一原版(BU毕业证)波士顿大学毕业证成绩单
一比一原版(BU毕业证)波士顿大学毕业证成绩单
 
Investigate & Recover / StarCompliance.io / Crypto_Crimes
Investigate & Recover / StarCompliance.io / Crypto_CrimesInvestigate & Recover / StarCompliance.io / Crypto_Crimes
Investigate & Recover / StarCompliance.io / Crypto_Crimes
 
一比一原版(QU毕业证)皇后大学毕业证成绩单
一比一原版(QU毕业证)皇后大学毕业证成绩单一比一原版(QU毕业证)皇后大学毕业证成绩单
一比一原版(QU毕业证)皇后大学毕业证成绩单
 
Q1’2024 Update: MYCI’s Leap Year Rebound
Q1’2024 Update: MYCI’s Leap Year ReboundQ1’2024 Update: MYCI’s Leap Year Rebound
Q1’2024 Update: MYCI’s Leap Year Rebound
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
 
The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...
 
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
 

Linear Search Presentation

  • 1. Linear Search Presentation on Submitted by: Markajul Hasnain Alif ID: 161-35-139
  • 2. Contents Definitions (Data, Structure, Data Structure, Search, Linear search) Example Pseudocode Advantages and disadvantages Discussion And Sources Linear Search Presentation on
  • 3. What is data? Data is a collection of facts, such as numbers, words, measurements, observations or even just descriptions of things. Linear Search Presentation on
  • 4. What is structure? The arrangement of and relations between the parts or elements of something complex. Linear Search Presentation on
  • 5. What is data structure? data structure is a specialized format for organizing and storing data. Linear Search Presentation on
  • 6. What is search? Search is the process of looking for something. Linear Search Presentation on
  • 7. What is linear search? linear search or sequential search is a method for finding a target value within a list. It sequentially checks each element of the list for the target value until a match is found or until all the elements have been searched. Linear Search Presentation on
  • 8. Linear search example If you are asked to find the name of the person having phone number say “1234” with the help of a telephone directory. Since telephone directory is sorted by name not by numbers,we have to go through each and every number of the directory Linear Search Presentation on
  • 9. Pseudocode For all elements Check if it is equal to element being searched for. If it is, return its position. else continue. Linear Search Presentation on
  • 11. Advantages ⦿ If the first number in the directory is the number you were searching for ,then lucky you!!. ⦿ Since you have found it on the very first page,now its not important for you that how many pages are there in the directory. ⦿ Whether if it is of 1000 pages or 2000 pages it will take u same time to find you the number ,if it is at the very beginning . . Linear Search Presentation on
  • 12. Disadvantages ⦿ It may happen that the number you are searching for is the last number of directory or if it is not in the directory at all. ⦿ In that case you have to search the whole directory. ⦿ Now number of elements will matter to you.if there are 500 pages ,you have to search 500;if it has 1000 you have to search 1000. Linear Search Presentation on
  • 13. Discussion ⦿ Sorted array is not needed. ⦿ Works fine for small number of elements .Search time increases with number of elements. ⦿ Elements with higher probability of being searched should be kept in the beginning. Linear Search Presentation on
  • 15. Thank you all. Linear Search Presentation on