Skip to content

Improved linear search: return index, input validation, multpile queries#1474

Closed
inesh126 wants to merge 1 commit into
TheAlgorithms:masterfrom
inesh126:master
Closed

Improved linear search: return index, input validation, multpile queries#1474
inesh126 wants to merge 1 commit into
TheAlgorithms:masterfrom
inesh126:master

Conversation

@inesh126

@inesh126 inesh126 commented Jun 7, 2025

Copy link
Copy Markdown

This pull request improves the existing linear search implementation by:

Changing the return value to the index of the found element instead of just 1/0, allowing users to know the exact position.

Adding input validation to handle edge cases, such as empty arrays.

Modifying the program to allow multiple search queries without restarting.

Enhancing code readability with comments and cleaner variable names.

These improvements make the linear search function more useful and the program more user-friendly.

@inesh126

inesh126 commented Jun 7, 2025

Copy link
Copy Markdown
Author

Hi, Im new here and this is my first PR
Id love to get to interact about anything and any helpful guidance
Thank You!

@github-actions

Copy link
Copy Markdown
Contributor

This pull request has been automatically marked as abandoned because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions Bot added the Stale label Jul 22, 2025
@github-actions

Copy link
Copy Markdown
Contributor

Please ping one of the maintainers once you commit the changes requested or make improvements on the code. If this is not the case and you need some help, feel free to ask for help in our Gitter channel or our Discord server. Thank you for your contributions!

@github-actions github-actions Bot closed this Jul 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants