static void Main(string[] args) { string inputString = "abba"; int result; Solution1 sol = new Solution1(); result = sol.LengthOfLongestSubstring(inputString); Console.WriteLine(result); }
static void Main(string[] args) { int result; // Solution1 Test result = Solution1.LengthOfLongestSubstring("pwwkew"); Console.WriteLine($"Approach 1: Brute Force\nresult: {result}"); // Solution2 Test result = Solution2.LengthOfLongestSubstring("pwwkew"); Console.WriteLine($"Approach 2: Sliding Window\nresult: {result}"); //Solution3 Test result = Solution3.LengthOfLongestSubstring("pwwkew"); Console.WriteLine($"Approach 3: Sliding Window optimized\nresult: {result}"); }