Skip to content

Handle null and empty input in LinearSearch implementation #7340

@AbhiramSakha

Description

@AbhiramSakha

What would you like to share?

The current LinearSearch implementation does not explicitly handle null or empty arrays.

Suggested improvements:

  • Add a null check for the input array
  • Handle empty array case properly

This will improve robustness and prevent unexpected runtime exceptions.

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    awaiting triageAwaiting triage from a maintainer

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions