• Post Reply Bookmark Topic Watch Topic
  • New Topic

TreeSet has Red and White Structure , whats that suppose to mean?  RSS feed

 
Vishal Hegde
Ranch Hand
Posts: 1078
Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
TreeSet has Red and White Structure , whats that suppose to mean
 
James Sabre
Ranch Hand
Posts: 781
Java Netbeans IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Vishal Hegde wrote:TreeSet has Red and White Structure , whats that suppose to mean


A 'red-black' tree is a tree data structure where nodes are either coloured 'red' or 'black' depending whether or not they are paired with other nodes. This approach allows the tree to be kept pretty close to balanced at all times as nodes are added and removed. Google will find you the detail.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Red-black trees are balanced, so searches traverse a minimum number of nodes. The wikipedia article is a good place to start.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!