This program takes in a text file with four columns of integers. The program will use merge sort to find the first common elements encountered in all four columns in nlog(n) time. Worst case run time complexity is O(n^2).
sample input:
"17 18 6 20
51 13 53 52
21 22 25 26
18 27 28 29
54 57 56 55
67 62 79 18
106 92 18 42"
sample output:
The number 18 appears in all 4 columns.