An Enthusiast Programmer

Here I came up with a common interview question that you might get in an interview.

So the question goes as follows,

Write a function, that when given a multi-level array, flattens it into a 1D array.Sample Input — [1, 2, [3, [4, 5]]…