File tree Expand file tree Collapse file tree 1 file changed +6
-12
lines changed
Expand file tree Collapse file tree 1 file changed +6
-12
lines changed Original file line number Diff line number Diff line change @@ -276,12 +276,9 @@ def lower_bound(sorted_collection: list[int], item: int) -> int:
276276 """
277277 Returns the index of the first element greater than or equal to the item.
278278
279- Args:
280- sorted_collection: The sorted list to search.
281- item: The item to find the lower bound for.
282-
283- Returns:
284- int: The index where the item can be inserted while maintaining order.
279+ :param sorted_collection: The sorted list to search.
280+ :param item: The item to find the lower bound for.
281+ :return: The index where the item can be inserted while maintaining order.
285282 """
286283 left = 0
287284 right = len (sorted_collection )
@@ -298,12 +295,9 @@ def upper_bound(sorted_collection: list[int], item: int) -> int:
298295 """
299296 Returns the index of the first element strictly greater than the item.
300297
301- Args:
302- sorted_collection: The sorted list to search.
303- item: The item to find the upper bound for.
304-
305- Returns:
306- int: The index where the item can be inserted after all existing instances.
298+ :param sorted_collection: The sorted list to search.
299+ :param item: The item to find the upper bound for.
300+ :return: The index where the item can be inserted after all existing instances.
307301 """
308302 left = 0
309303 right = len (sorted_collection )
You can’t perform that action at this time.
0 commit comments