This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
#Given an array of random numbers, Push all the zero’s of a given array to the end of the array
#Time Complexity: O(n),Auxiliary Space: O(1)
##Algorithm:
#Traverse the given array from left to right andmaintain count of non-zero elements in array.
# For every non-zero element arr[i], put the element at ‘arr[count]’ and increment ‘count’.
# After complete traversal, all non-zero elements have already been shifted to front end and ‘count’ is set as index of first 0.
# Now run a loop which makes all elements zero from ‘count’ till end of the array zero.