@KK, yes set is not indexed, but you can insert the map elements in set in sorted order( based on value, here by providing your own comparison class), and using an iterator over this set, you can access each element(each map element). say, from set.begin() to set.end(), you will have the map elements in required sorted order.
On Sat, Jun 18, 2011 at 6:02 PM, DK <[email protected]> wrote: > There is a data structure called a bimap. You can access the elements by > key and value and they are interlinked. Do a quick google on it. I think > that's what you're looking for. > > > -- > DK > > http://twitter.com/divyekapoor > Http://www.divye.in > > -- > You received this message because you are subscribed to the Google Groups > "Algorithm Geeks" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/algogeeks/-/Vqlaqqm3ZzoJ. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/algogeeks?hl=en. > > -- Harshal Choudhary, Final Year B.Tech CSE, NIT Surathkal, Karnataka, India. -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
