https://ide.codingblocks.com/s/270156. try to create map<int,vector> but it gives error
How to map array elements with all their indexes where they repeat
@rohitkandpal683 the way you are doing traversal of the map is wrong. i
will give you a key-value PAIR. pair.first will give you the key(int) and pair.second wil give you the value (vector)
i have made changes, it is running now https://ide.codingblocks.com/s/270164
Dont forget to mark the doubt as resolved!