public List<Integer> commonElements(int input1[], int input2[], int input3[]) {
        int i = 0;
        int j = 0;
        int k = 0;
        List<Integer> result = new ArrayList<>();
        while (i < input1.length && j < input2.length && k < input3.length) {
            if (input1[i] == input2[j] && input2[j] == input3[k]) {
                result.add(input1[i]);
                i++;
                j++;
                k++;
            } else if (input1[i] < input2[j]) {
                i++;
            } else if (input2[j] < input3[k]) {
                j++;
            } else {
                k++;
            }
        }
        return result;
    }
Date 01/01/2016
@author Tushar Roy

Given 3 sorted array find common elements in these 3 sorted array.

Time complexity is O(m + n + k)

http://www.geeksforgeeks.org/find-common-elements-three-sorted-arrays/
src/com/interview/array/CommonThreeSortedArray.java