August Home interview question

Implement a flatten method for arrays