diff options
| author | Scott <[email protected]> | 2022-01-26 15:36:05 -0800 |
|---|---|---|
| committer | Scott <[email protected]> | 2022-01-26 15:36:05 -0800 |
| commit | 26aeb26a54ef46a06a84d6c62492ebca318c5263 (patch) | |
| tree | def200f3b5f0c012d52bdb8ea0dcb3237d044eb0 | |
| parent | 444d1e5f3e9a39759079736302e3404018141b02 (diff) | |
Reformatting.
| -rw-r--r-- | list_utils.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/list_utils.py b/list_utils.py index b877e38..b65ab0d 100644 --- a/list_utils.py +++ b/list_utils.py @@ -229,7 +229,9 @@ def _permute(seq: Sequence[Any], path): yield from _permute(cdr, path + car) -def binary_search(lst: Sequence[Any], target: Any, *, sanity_check=False) -> Tuple[bool, int]: +def binary_search( + lst: Sequence[Any], target: Any, *, sanity_check=False +) -> Tuple[bool, int]: """Performs a binary search on lst (which must already be sorted). Returns a Tuple composed of a bool which indicates whether the target was found and an int which indicates the index closest to |
