← Nagarro questions

Rearrange array into negative and positive elements in O(n log n)

Filed under Nagarro

Given an array of numbers, move all negative elements to the left side and all positive elements to the right side with a time complexity of O(n log n).

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Nagarro questions

Collected from public candidate posts and coding forums. Updated Nov 2026.