we could maybe keep an array of keys and sort them according to the values
stored in the hashtable....just 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 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 <divyekap...@gmail.com> 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 algogeeks@googlegroups.com.
>> To unsubscribe from this group, send email to
>> algogeeks+unsubscr...@googlegroups.com.
>> 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 algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to