public void CalculatesMinimumBribesAmount(int[] a, string expected) { var content = new StringBuilder(); using (var writer = new StringWriter(content)) OtherIndicesProblems.CalcMinimumBribesAmount(writer, a); string actualOutput = content.ToString().Replace(Environment.NewLine, ""); actualOutput.Should().Be(expected); }
public void ReversesString(string s, int k, string expected) { OtherIndicesProblems.ReverseString(s, k).Should().Be(expected); }
public void CalculatesArrayZeroFragmentsCount(int[] arr, int expected) { OtherIndicesProblems.CalcZeroFragmentsCount(arr).Should().Be(expected); }
public void CalculatesHourglassSum(int[][] arr, int expected) { OtherIndicesProblems.CalcMaxHourglassSum(arr).Should().Be(expected); }
public void RotatesLeft(int[] a, int d, int[] expected) { OtherIndicesProblems.RotateLeft(a, d).Should().BeEquivalentTo(expected); }
public void CalculatesSubarraySum(int[] arr, int k, int expected) { OtherIndicesProblems.CalcSubarraysAmount(arr, k).Should().Be(expected); }