Find the Longest Substring with at Most Two Distinct Characters
Company: TikTok
Role: Software Engineer
Category: Coding & Algorithms
Difficulty: medium
Interview Round: Technical Screen
Overview: Find the longest contiguous substring containing at most two distinct characters. This portable version of the standard referenced problem defines empty input, an ASCII character domain, exact return semantics, and two examples for later cross-language console verification.
Read the full TikTok Software Engineer interview experience this question came from