An Efficient data structure for Sorted List
        Posted  
        
            by holydiver
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by holydiver
        
        
        
        Published on 2010-05-09T04:36:48Z
        Indexed on 
            2010/05/09
            4:48 UTC
        
        
        Read the original article
        Hit count: 368
        
I want to save my objects according to a key in the attributes of my object in a sorted fashion. Later on I'll access these objects sequentially from max key to min key. I'll do some search tasks as well.
I consider to use either AVL tree or RB Tree. As far as i know they are nearly equivalent in theory(Both have O(logn)). But in practice which one might be better in performance in my situation. And is there a better alternative than those, considering that I'll mostly do insert and sequentially access to the ds.
© Stack Overflow or respective owner