Flatten list

Flatten list iterative and recursive