Returns subarray with sum closest to 0.
static Pair findSubArray ( int arr [ ] , int n ) { int start = - 1 , end = - 1 , min_diff = Integer . MAX_VALUE ; Prefix pre_sum [ ] = new Prefix [ n + 1 ] ; for ( int i = 0 ; i < n + 1 ; i ++ ) pre_sum [ i ] = new Prefix ( ) ;