toString for a BST java
public String toString()
Returns a string representation of this BST usingindentation to represent each “level” of the tree. The root shouldbe the furthest left when the string is printed, its childrenshould be indented by 6 spaces, their children by 12 spaces, etc.Each node other than the root should be labeled as L for leftchildren and R for right children. For example:
L even
the
Lundo
R word
L zag
Rzig
R zoo
Expert Answer
Answer to toString for a BST java public String toString() Returns a string representation of this BST using indentation to repres…