What are applications of alphabetic trees?

What are some real-world applications of Red-Black trees today?

  • Can anyone point to real-world applications and places where red-black trees are used today?

  • Answer:

    They are also used in Computational Geometry - you will find many papers on scholar or citeseer

Mukul Joshi at Quora Visit the source

Was this solution helpful to you?

Other answers

http://docs.oracle.com/javase/7/docs/api/java/util/TreeMap.html uses Red-Black tree as its backend. There are two popular Balanced Binary Search Tree: AVL Tree and Red-Black Tree. Both offers O(lg n) search time. But the hidden constant behind Big O makes AVL Tree more suitable for search and Red-Black Tree for insertion-deletion. Insertion-deletion takes less time in Red-Black Tree than AVL Tree. That's Red-Black Tree are more popular than AVL Tree although implementing Red-Black is very complicated task.

Riyad Parvez

The process scheduler in Linux uses Red Black Trees. The red black trees are a replacement for run queues which had priorities for processes on the queue for the scheduler to pick up from. The Completely Fair Scheduler (CFS) is the name of a process scheduler which was merged into the 2.6.23 release of the Linux kernel. It handles CPU resource allocation for executing processes, and aims to maximize overall CPU utilization while also maximizing interactive performance.

Pratik Mandrekar

Red Black trees are used in http://en.wikipedia.org/wiki/Completely_Fair_Scheduler in Linux Kernel Computational Geometry Data structures In various implementations of Associative Data structures (for e.g C++ STL uses RB tree internally to implement Set and Map)

Siddharth Maheshwari

While this doesn't directly answer your question, but the C++ STL implementation of Map uses a Red-Black Tree.

Sonny Gupta

Red-black trees are needed when height balancing is a desirable trait, and insertion/deletion must not be too slow either. RB trees are common in the Linux kernel. Two of the places where you can see it are: In the http://en.wikipedia.org/wiki/Completely_Fair_Scheduler implementation - the process virtual runtimes serve as the key. To keep track of the virtual memory segments for a process - the start address of the range serves as the key. As you may notice, in both cases it is important to retrieve the node by their key rather quickly from performance considerations.

Anirban Ghoshal

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.