Just Think of Prefix Xor concept


#1

Prefix Xor concept with the use of map helps in finding the whole set of triplets which covers the repeated cases too
Consider map as unordered_map<int,vector> where vector consists of index,
I hope so this hint helps you think more.
Thank You!