@Test public void testMaxSubStringKUniqueChars() throws Exception { String input = "abcbbbbcccbdddadacb"; String expectedOutput = "bcbbbbcccb"; LongestSubstring longestSubstring = new LongestSubstring(); String result = longestSubstring.maxSubStringKUniqueChars(input, 2); assertEquals(result, expectedOutput); }
@Test public void testMaxSubStringKUniqueChars4() throws Exception { String input = "aaaaaaaaaaaaaaaa"; String expectedOutput = null; LongestSubstring longestSubstring = new LongestSubstring(); String result = longestSubstring.maxSubStringKUniqueChars(input, 2); assertEquals(result, expectedOutput); }