mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-05 01:09:40 +08:00
Create codespell.yml (#1698)
* fixup! Format Python code with psf/black push * Create codespell.yml * fixup! Format Python code with psf/black push
This commit is contained in:
@ -15,7 +15,7 @@ def interpolation_search(sorted_collection, item):
|
||||
right = len(sorted_collection) - 1
|
||||
|
||||
while left <= right:
|
||||
# avoid devided by 0 during interpolation
|
||||
# avoid divided by 0 during interpolation
|
||||
if sorted_collection[left] == sorted_collection[right]:
|
||||
if sorted_collection[left] == item:
|
||||
return left
|
||||
@ -59,7 +59,7 @@ def interpolation_search_by_recursion(sorted_collection, item, left, right):
|
||||
:return: index of found item or None if item is not found
|
||||
"""
|
||||
|
||||
# avoid devided by 0 during interpolation
|
||||
# avoid divided by 0 during interpolation
|
||||
if sorted_collection[left] == sorted_collection[right]:
|
||||
if sorted_collection[left] == item:
|
||||
return left
|
||||
|
Reference in New Issue
Block a user