red-black trees in this our approach to the discussion balanced and unbalanced you learned in "binary trees,ordinary binary search trees offer important advantages as data storage devicesyou can quickly search for an item with given keyand you can also quickly insert or delete an item other data storage structuressuch as arrayssorted arraysand linked listsperform one or the other of these activities slowly thusbinary search trees might appear to be the ideal data storage structure unfortunatelyordinary binary search trees suffer from troublesome problem they work well if the data is inserted into the tree in random order howeverthey become much slower if data is inserted in already-sorted order ( or inversely sorted order ( when the values to be inserted are already ordereda binary tree becomes unbalanced with an unbalanced treethe ability to quickly find (or insert or deletea given element is lost this explores one way to solve the problem of unbalanced treesthe red-black treewhich is binary search tree with some added features there are other ways to ensure that trees are balanced we'll mention some at the end of this and examine severaltrees and - treesin trees and external storage in factas we'll see in that operations on tree correspond in surprising way to operations on red-black tree our approach to the discussion we'll explain insertion into red-black trees little differently than we have explained insertion into other data structures red-black trees are not trivial to understand because of this and also because of multiplicity of trees experimenting with the workshop applet rotations inserting new node deletion the efficiency of red-black trees red-black tree implementation other balanced trees