All Generation Tech interview question

It was an online interview with live coding test