Skip to content

Enhance LinearSearch with null check for value#7355

Open
AbhiramSakha wants to merge 1 commit intoTheAlgorithms:masterfrom
AbhiramSakha:patch-8
Open

Enhance LinearSearch with null check for value#7355
AbhiramSakha wants to merge 1 commit intoTheAlgorithms:masterfrom
AbhiramSakha:patch-8

Conversation

@AbhiramSakha
Copy link
Copy Markdown
Contributor

Fixes #7348

Changes made:

  • Added null check for input array
  • Handled empty array case
  • Added null check for search value
  • Prevented NullPointerException by checking array elements

Result:

Improved robustness and stability of LinearSearch implementation

Added null check for the search value in the find method.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Handle null and empty input in LinearSearch implementation

1 participant