Given a string s, return the length of the longest substring that contains at most two distinct characters. Example 1: Input…
My memo and playground
Given a string s, return the length of the longest substring that contains at most two distinct characters. Example 1: Input…