Salescode.ai Interview Question

Longest Subarray Containing at Most Two Distinct Elements