You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 10, 2024. It is now read-only.
Linear search is a very simple search algorithm. In this type of search, a sequential search is made over all items one by one. Every item is checked and if a match is found then that particular item is returned, otherwise the search continues till the end of the data collection.
Linear search is the simplest search algorithm. For this reason, it is often called sequential search.
Pseudocode
procedure linear_search (list, value)
for each item in the list
if match item == value
return the item's location
end if
end for
end procedure
Example
list = [1,2,3,4,5]
value = 4
Output : 3
How to contribute
Comment !assign to assign this issue to yourself
Fork this repository
Create a new branch
Save the solution in program/program/implement-linear-search/implement_linear_search.r
Commit the changes
Create a pull request
The text was updated successfully, but these errors were encountered:
Description
Write a R program to implement linear search
Linear search is a very simple search algorithm. In this type of search, a sequential search is made over all items one by one. Every item is checked and if a match is found then that particular item is returned, otherwise the search continues till the end of the data collection.
Linear search is the simplest search algorithm. For this reason, it is often called sequential search.
Pseudocode
Example
How to contribute
!assign
to assign this issue to yourselfprogram/program/implement-linear-search/implement_linear_search.r
The text was updated successfully, but these errors were encountered: