Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I dont think there is any use for "pure" binary trees. (except for educational purposes) Balanced binary trees, such as <a href="http://en.wikipedia.org/wiki/Red%E2%80%93black_tree" rel="nofollow noreferrer">Red-Black trees</a> or <a href="http://en.wikipedia.org/wiki/AVL_tree" rel="nofollow noreferrer">AVL trees</a> are much more useful, because they guarantee O(logn) operations. Normal binary trees may end up being a list (or almost list) and are not really useful in applications using much data.</p> <p>Balanced trees are often used for implementing maps or sets. They can also be used for sorting in O(nlogn), even tho there exist better ways to do it.</p> <p>Also for searching/inserting/deleting <a href="http://en.wikipedia.org/wiki/Hash_table" rel="nofollow noreferrer">Hash tables</a> can be used, which usually have better performance than binary search trees (balanced or not).</p> <p>An application where (balanced) binary search trees would be useful would be if searching/inserting/deleting and sorting would be needed. Sort could be in-place (almost, ignoring the stack space needed for the recursion), given a ready build balanced tree. It still would be O(nlogn) but with a smaller constant factor and no extra space needed (except for the new array, assuming the data has to be put into an array). Hash tables on the other hand can not be sorted (at least not directly).</p> <p>Maybe they are also useful in some sophisticated algorithms for doing something, but tbh nothing comes to my mind. If i find more i will edit my post.</p> <p>Other trees like f.e. <a href="http://en.wikipedia.org/wiki/B+trees" rel="nofollow noreferrer">B+trees</a> are widely used in databases</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload