AT&T interview question

Leetcode question and design system question