but in a set elements are not in any order...and also set cannot be
indexed...
if u want to sort in the basis of key use vector with pair...
Correct me if m wrong
--
You received this message because you are subscribed to the Google Groups
Algorithm Geeks group.
To post to this group, send
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
@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
we could maybe keep an array of keys and sort them according to the values
stored in the hashtablejust my 2 cents
On Sat, Jun 18, 2011 at 6:10 PM, Harshal hc4...@gmail.com wrote:
@KK,
yes set is not indexed, but you can insert the map elements in set in
sorted order( based on value, here