Even tough it is not exactly what you asked for, printing trees horizontally is way simpler. And especially in case of large trees, I think this is the better representation form.
└──8
├──5
│ ├──2
│ └──6
└──10
├──9
└──11
Following C++ code roots in this java implementation.
void
…
Top comments (0)