PayPal Interview Question

Flatten an array (recursive and iterative)