public static void main(String args[]) {
        int input1[] = {1, 0, 0, 1, 1, 0};
        int input2[] = {0, 1, 1, 0, 1, 1};
        LongestSameSumSpan lsss = new LongestSameSumSpan();
        System.out.print(lsss.longestSpan(input1, input2));
    }
Date 12/29/2015
@author Tushar Roy

Give two arrays of same size consisting of 0s and 1s find span (i, j) such that
sum of input1[i..j] = sum of input2[i..j]

Time complexity O(n)
Space complexity O(n)

http://www.geeksforgeeks.org/longest-span-sum-two-binary-arrays/
src/com/interview/array/LongestSameSumSpan.java