public void LengthOfLongestSubstringTest_EmptyInput() { var solution = new _003_LongestSubstringWithoutRepeatingCharacters(); var result = solution.LengthOfLongestSubstring(""); Assert.AreEqual(0, result); }
public void LengthOfLongestSubstringTest_EmptyInput() { var solution = new _003_LongestSubstringWithoutRepeatingCharacters(); var result = solution.LengthOfLongestSubstring(""); Assert.AreEqual(0, result); }
public void LengthOfLongestSubstringTest_RepeatChars() { var input = "bbbbb"; var solution = new _003_LongestSubstringWithoutRepeatingCharacters(); var result = solution.LengthOfLongestSubstring(input); Assert.AreEqual(1, result); }
public void LengthOfLongestSubstringTest_LongString_HaveShortRepeat() { var input = "abcdefghijklmnopqrstuvwxyzabcdefghijk lmnopqrstuvwxyz"; var solution = new _003_LongestSubstringWithoutRepeatingCharacters(); var result = solution.LengthOfLongestSubstring(input); Assert.AreEqual(27, result); }
public void LengthOfLongestSubstringTest() { var input = "abcabcbb"; var solution = new _003_LongestSubstringWithoutRepeatingCharacters(); var result = solution.LengthOfLongestSubstring(input); Assert.AreEqual(3, result); }
public void LengthOfLongestSubstringTest_LongString_HaveShortRepeat() { var input = "abcdefghijklmnopqrstuvwxyzabcdefghijk lmnopqrstuvwxyz"; var solution = new _003_LongestSubstringWithoutRepeatingCharacters(); var result = solution.LengthOfLongestSubstring(input); Assert.AreEqual(27, result); }