<reponame>paulo-erichsen/leetcode
import importlib

module = importlib.import_module("algorithms.0238_product_of_array_except_self")


def test_product_of_array_except_self():
    s = module.Solution()
    assert s.productExceptSelf([2, 3]) == [3, 2]
    assert s.productExceptSelf([2, 3, 4]) == [12, 8, 6]
    assert s.productExceptSelf([1, 2, 3, 4]) == [24, 12, 8, 6]
    assert s.productExceptSelf([1, 2, 3, 4, 5]) == [120, 60, 40, 30, 24]
    assert s.productExceptSelf([-1, 1, 0, -3, 3]) == [0, 0, 9, 0, 0]
    assert s.productExceptSelf([10, 3, 5, 6, 2]) == [180, 600, 360, 300, 900]
