• + 0 comments

    Your idea didn't work. I did the same like firstly sorted the array, then placed element at n/2(middle element) in set1 and then alternately in set2 and set1 from both sides of middle but only a few test cases could pass!