โ† Nagarro questions
CodingBasic

Zeros partitioning in O(n) and O(1) space

Filed under Nagarro

Given an array of integers, partition the array to move all zeros to the end while maintaining the relative order of the non-zero elements. Perform this in-place.

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.