AT&T interview question

Nothing to difficult