Implement a flatten array function · InterviewLane