public static void Run() { int result1 = LongestSubstringKDistinct.findLength("araaci", 2); int result2 = LongestSubstringKDistinct.findLength("araaci", 1); int result3 = LongestSubstringKDistinct.findLength("cbbebi", 3); Console.WriteLine($"Length of the longest substring: S=2: {result1}"); Console.WriteLine($"Length of the longest substring: S=1: {result2}"); Console.WriteLine($"Length of the longest substring: S=3: {result3}"); }
static void Main(string[] args) { LongestSubstringKDistinct.Run(); }