Google | Phone Interview | rearrange array
Anonymous User
1133

Given a unsorted array return array such that: any elements in even indices are no larger than any elements in odd indices.

eg: [-1,-1,0,5,2]
op: : [-1,5,0,2,-1]

multiple solution possible return any one solution.

Comments (4)