I just put, the logic.. My code is a pretty big one, extracting from a DB and then trying to put it on a file. But, I'm stuck in this part of the logic wherein if I try to filter the duplicates always the 1st is picked the remaining is removed.. I wanted to know how can I ignore the 1st duplicate and pick the 2nd one..