Tech Off Post

Single Post Permalink

View Thread: AVL tree vs red-black tree
  • User profile image

    Mr Crash said:
    ManipUni said:

    ah so that's what MasterPie meant.


    Well i can assure you that it is not a homework assignment.

    Yes i have a somewhat limited basic idea of the trees but i want to hear what the experts think.


    No offense but why all this interrogation, all the time, it's just time wasting, i'm not joining the cia or anything like that i just want to hear what the experts think, is that so wrong ?


    I thought c9 was a friendly tech community and instead i get interrogated like a student (criminal ?)


    Is it wrong to ask questions here too ? Am i doing something wrong ? I'm getting sick of getting interrogated all the time.


    If you don't want to help me verify my knowledge about these trees then go away please you're not helping.

    i want to hear what the experts think


    Well, an expert will likely talk in terms of complexity, tree depth and so on. Since you say you didn't understand the Wikipedia page why do you expect that you will understand what an expert has to say?


    All the information you want is there on the web but you have to read the right lines and skip the math. For example (from the above mentioned Wikipedia page on AVL trees):


    AVL trees are often compared with red-black trees because they support the same set of operations and because red-black trees also take O(log n) time for the basic operations. AVL trees perform better than red-black trees for lookup-intensive applications


    Both AVL trees and red-black trees are self-balancing binary search trees, so they are very similar mathematically. The operations to balance the trees are different, but both occur in constant time. The real difference between the two is the limiting height


    The AVL tree is more rigidly balanced than Red-Black trees, leading to slower insertion and removal but faster retrieval.