Search
Finish the method definition given below.
Given an array arr as input, the method should return a new array containing all the elements of arr in a flattened form.
arr