Exemplo n.º 1
0
 public void RomanToInt(int expectedResult, string num)
 {
     Assert.AreEqual(expectedResult, LeetCodeUtils.RomanToInt(num));
 }
Exemplo n.º 2
0
 public void NthUglyNumber(int n, int expectedResult)
 {
     Assert.AreEqual(expectedResult, LeetCodeUtils.NthUglyNumber(n));
 }
Exemplo n.º 3
0
 public void CreateHuffmanCode(int[] frequencies, string[] expectedResult)
 {
     Assert.IsTrue(expectedResult.SequenceEqual(LeetCodeUtils.CreateHuffmanCode(frequencies)));
 }
Exemplo n.º 4
0
 public void IntToRoman(string expectedResult, int num)
 {
     Assert.AreEqual(expectedResult, LeetCodeUtils.IntToRoman(num));
 }
Exemplo n.º 5
0
 public void LengthOfLongestSubstring(string s, int expectedResult)
 {
     Assert.AreEqual(expectedResult, LeetCodeUtils.LengthOfLongestSubstring(s), s);
 }
Exemplo n.º 6
0
 public void TestDetectWordMinimumPeriodLength(int expected, string data)
 {
     Assert.AreEqual(expected, LeetCodeUtils.DetectWordMinimumPeriodLength(data));
 }
Exemplo n.º 7
0
 public void TestAllMaximumBorderLength(int[] expected, string data)
 {
     Assert.IsTrue(expected.SequenceEqual(LeetCodeUtils.AllMaximumBorderLength(data)));
 }
Exemplo n.º 8
0
 public void TwoSum(int[] nums, int target, int[] expectedResult)
 {
     AssertAreEqual(expectedResult, LeetCodeUtils.TwoSum(nums, target));
 }
Exemplo n.º 9
0
 public int GetLength(string code)
 {
     return(LeetCodeUtils.lengthOfLongestSubstring(code));
 }