Move all zeros to end of array
Given an array of integers arr[], the task is to move all the zeros to the end of the array while maintaining the relative order of all non-zero elements.Examples: Input: arr[] = [1, 2, 0, 4, 3, 0, 5, 0]Output: arr[] = [1, 2, 4, 3, 5, 0, 0, 0]Explanation: There are three 0s that are moved to the end