Bhavna interview question

Flatten array which were nested in n