BNP Paribas Interview Question

find duplicate using collections