Finish problem 1552-magnetic-force-between-two-balls

This commit is contained in:
Johan Sandoval
2026-07-25 14:08:11 -05:00
parent 472bd07e11
commit 7d56ecae01
2 changed files with 36 additions and 0 deletions
@@ -0,0 +1,13 @@
import pytest
from solution import Solution
@pytest.mark.parametrize(
"position, m, expected",
[
([1, 2, 3, 4, 7], 3, 3),
([5, 4, 3, 2, 1, 1000000000], 2, 999999999),
],
)
def test_max_distance(position, m, expected):
assert Solution().maxDistance(position, m) == expected