Is there a way out that could override the sorting phenomenon in TreeMap so that the performance could be improved?????
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   gaurav_saini
Posted On:   Thursday, September 16, 2004 10:18 PM

Is there a way out that could override the sorting phenomenon in TreeMap so that the performance could be improved????? If yes then kindly give a sample code for the same.........

Re: Is there a way out that could override the sorting phenomenon in TreeMap so that the performance could be improved?????

Posted By:   Jani_Kaarela  
Posted On:   Friday, September 17, 2004 03:57 AM


What exactly is the point in doing that? The idea of TreeMap is to be quickly navigable and thus have very efficient containsKey, get, put and remove operations, which is why the objects in it have to be sorted.



If you need a tree-like structure without the functionality (and it's related cost) of TreeMap, it is fairly trivial to implement it from scratch.

About | Sitemap | Contact