Skip to content

Conversation

007AnupamSharma
Copy link
Contributor

Description

it is defined as a sequential search algorithm that starts at one end and goes through each element of a list until the desired element is found, otherwise the search continues till the end of the data set.

Linear search works by comparing each element of the data structure with the key to be found.

LinearSearch (array, index, key):
if index < 0:
return -1;
if item = key:
return index
return LinearSearch (array, index-1, key)

@007AnupamSharma
Copy link
Contributor Author

@kelvins please review the code

Copy link
Owner

@kelvins kelvins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @007AnupamSharma! Please, add the LinearSearchRecursive.cpp link to the README file.

updated readme for linear search algorithm
update with formatting and small changes
@007AnupamSharma
Copy link
Contributor Author

@kelvins i had made all changes that you want ... would you please review it

this file is not necessary
@kelvins kelvins merged commit a414160 into kelvins:main Oct 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants