O(n) extra space for Equalizing the array
Out of Free Stories? Here is my Friend Link.
I have published an ebook. A compilation of 100 Java(Interview)Programming problems which have been solved . I have given clear explanation and the code in the book. Believe me when I say, this will kick start you to achieve the job at your dream company.