Houzz Interview Question

Flatten an array