I have to display nodes in bst in the below given format:

I have insesrted the nodes properly and able to display it using preorder.

if the nodes are F,D,E...the output should come as:

Code:
F
 + - - D
          + - - NULL
          \ - - E
                  + - - NULL
                   \ - - NULL
 \ - - NULL