Write a method which eliminates pair numbers from continuous stream of numbers read one at a time until no more numbers are returned. Numbers are not read in order and there can be duplicates.
For example :
{3,7,9,41,21, 56, 8, 2} should become {9,41,21,56}, so pairs like 2,3 and 7,8 needs to be eliminated.
out of 10