listing trees and external storage continued return charat( )//public static int getint(throws ioexception string getstring()return integer parseint( )///end class tree app ///////////////////////////////////////////////////////////////trees and red-black trees at this point trees and red-black trees (described in probably seem like entirely different entities howeverit turns out that in certain sense they are completely equivalent one can be transformed into the other by the application of few simple rulesand even the operations needed to keep them balanced are equivalent mathematicians would say they were isomorphic you probably won' ever need to transform tree into red-black treebut equivalence of these structures casts additional light on their operation and is useful in analyzing their efficiency historicallythe tree was developed firstlater the red-black tree evolved from it transformation from to red-black tree can be transformed into red-black tree by applying three rulesas shown in figure transform any -node in the tree into black node in the red-black tree this is shown in figure transform any -node into child node and parent nodeas shown in figure the child node has two children of its owneither and or and the parent has one other childeither or it doesn' matter which item becomes the child and which the parent the child is colored red and the parent is colored black