6 ms·I did it using sets. I realise now I was using the HashSet optimizationby poxwole 4y agoI did it using sets. I realise now I was using the HashSet optimization