Fix linear_search docstring return value (#8644)

This commit is contained in:
Almas Bekbayev 2023-07-31 07:32:05 +06:00 committed by GitHub
parent 4710e51deb
commit 8cce9cf066
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,7 +15,7 @@ def linear_search(sequence: list, target: int) -> int:
:param sequence: a collection with comparable items (as sorted items not required :param sequence: a collection with comparable items (as sorted items not required
in Linear Search) in Linear Search)
:param target: item value to search :param target: item value to search
:return: index of found item or None if item is not found :return: index of found item or -1 if item is not found
Examples: Examples:
>>> linear_search([0, 5, 7, 10, 15], 0) >>> linear_search([0, 5, 7, 10, 15], 0)