public void Question01(int[] itens, bool hasMatch) { var result = Answers.FindTwoSum(itens, 9); if (result != null) { Assert.True((itens[result.Item1] + itens[result.Item2] == 9) == hasMatch); } else { Assert.True((result is null) == !hasMatch); } }
public void Question02(string brackets, bool expeted) { Assert.Equal(Answers.FindPathernBracets(brackets), expeted); }
public void Question04(int[] itens, int target) { Assert.Equal(target, Answers.WaterVolume2D(itens)); }