You are given two sorted list of numbers (ascending order). The lists themselves are comma delimited and the two lists are semicolon delimited. Print out the intersection of these two sets. Input sample: File containing two lists of ascending order sorted integers, comma delimited, one per line. E.g. 1,2,3,4;4,5,6 20,21,22;45,46,47 7,8,9;8,9,10,11,12 Output sample: Print out the ascending order sorted intersection of the two lists, one per line. Print empty new line in case the lists have no intersection. E.g. 4 8,9 |
|
|
1,1,1,1,1,1,1,1,1,1,1,1 6,6,5,6,6,6,6,6,6,7,7,7,7,7,7,6,6,8,8,8,8,8,8,8,8,8,6,6,9,7,7,7,7,7,7,0,7,7,7,7,7,7,1,7,7,7,7,7,7,2,7,7,7,7,7,7,3,7,7,7,7,7,7,4,7,7,7,7,7,7,5,7,7,7,7,7,7,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,8,8,8,8,8,8,8,7,7,7,7,7,7,9 5,4,5,5,5,6,5,7,5,8,8,8,8,8,8,8,8,8,8,8,5,9,9,9,6,0,0,6,1,1,6,2,6,3,6,4,6,5,6,6,6,7,6,8,8,8,8,8,8,8,8,8,8,8 9,7,7,7,7,7,7,7,7,7,7,9,8,8,8,8,8,8,9,9,1,1,0,0,1,1,0,1,1,1,1,0,2,2,1,1,0,3,3 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,8,8,8,7,7,7,7,9,8,8,8,8,8,0,8,8,8,8,8,1,8,8,8,8,8,2,8,8,8,8,8,3,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,7,7,7,7 8,8,8,8,8,8,8,8,8,8,8,0,0,8,8,8,8,8,8,8,8,8,8,8,1,1,8,8,8,8,8,8,8,8,8,8,8,2,2,8,8,8,8,8,8,8,8,8,8,8,3,8,8,8,8,8,8,8,8,8,8,8,4,8,8,8,8,8,8,8,8,8,8,8,5,8,8,8,8,8,8,8,8,8,8,8,6,8,8,8,8,8,8,8,8,8,8,8,7,7,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8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