Skip to content

Add missing type hints to functions in searches/linear_search.py #14592

@jgohel9902

Description

@jgohel9902

Feature description

Several functions in searches/linear_search.py are missing type hints on their parameters and return values, which is inconsistent with the repository's coding standards and makes the code harder to understand.

For example:
def linear_search(sequence, target):

Should be:
def linear_search(sequence: list, target: int) -> int:

Suggested improvement:

  • Add type hints to all function parameters and return values
  • Ensure consistency with the repo's contributing guidelines
  • This would also improve IDE support and static analysis with mypy

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementThis PR modified some existing files

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions