← Zoho questions

Array compression and zero shifting

Filed under Zoho

Given an array of integers, iterate through the array: if arr[i] == arr[i+1], replace arr[i] with 2*arr[i] and set arr[i+1] to 0. After processing, move all zeros to the end while maintaining the…

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 Zoho questions

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