A deque based on binary trees
        Posted  
        
            by 
                Greg Ros
            
        on Programmers
        
        See other posts from Programmers
        
            or by Greg Ros
        
        
        
        Published on 2012-07-01T21:37:49Z
        Indexed on 
            2012/07/02
            3:23 UTC
        
        
        Read the original article
        Hit count: 534
        
This is a simple immutable deque based on binary trees. What do you think about it? Does this kind of data structure, or possibly an improvement thereof, seem useful? How could I improve it, preferably without getting rid of its strengths? (Not in the sense of more operations, in the sense of different design) Does this sort of thing have a name?
Red nodes are newly instantiated; blue ones are reused. Nodes aren't actually red or anything, it's just for emphasis.

© Programmers or respective owner