Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions searches/linear_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"""


def linear_search(sequence: list, target: int) -> int:
def linear_search(sequence: list[int], target: int) -> int:
"""A pure Python implementation of a linear search algorithm

:param sequence: a collection with comparable items (sorting is not required for
Expand All @@ -33,7 +33,7 @@ def linear_search(sequence: list, target: int) -> int:
return -1


def rec_linear_search(sequence: list, low: int, high: int, target: int) -> int:
def rec_linear_search(sequence: list[int], low: int, high: int, target: int) -> int:
"""
A pure Python implementation of a recursive linear search algorithm

Expand Down