public void TestThreeSum() { int[] input = { -1, 0, 1, 2, -1, -4 }; _3Sum sum = new _3Sum(); var result = sum.ThreeSum(input); Assert.IsTrue(result.Count == 2); }
public void TestThreeSum1() { int[] input = { 0, 0, 0, 0 }; _3Sum sum = new _3Sum(); var result = sum.ThreeSum(input); Assert.IsTrue(result.Count == 1); }
public void TestThreeSum2() { int[] input = { -4, -2, 1, -5, -4, -4, 4, -2, 0, 4, 0, -2, 3, 1, -5, 0 }; _3Sum sum = new _3Sum(); var result = sum.ThreeSum(input); Assert.IsTrue(result.Count == 6); }