Oh right this thing

This commit is contained in:
2024-03-01 19:48:32 -05:00
parent ad65630b3f
commit a498ff949c
2 changed files with 25 additions and 0 deletions
+12
View File
@@ -491,3 +491,15 @@ def test_copy_neighborly_node(inlist):
assert id(orig) != id(copied)
assert orig == copied
assert stuff.neighborly_node_to_list(orig) == stuff.neighborly_node_to_list(copied)
@pytest.mark.parametrize(
("nums", "expected"),
[
([3, 4, 5, 1, 2], 1),
([4, 5, 6, 7, 0, 1, 2], 0),
([11, 13, 15, 17], 11),
],
)
def test_find_min_in_rotated_array(nums: list[int], expected: int):
assert stuff.find_min_in_rotated_array(nums) == expected