Skip to content

ankit-hindustani/LinearSearch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Linear/sequential search

Linear search algo is very simple and its time complexity O(n).

Algorithm : linearSearch(searchElement)
Start:
Step 1: found = false
Step 2: iterate all “element” of data structure and perform step 3
Step 3: if(searchElement == element)
then perform step 4 & step 5.
Step 4 : found = true
Step 5: break
Step 6: return found
end:

About

Implementation of Linear/sequential search in java

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages