I need a php code for binary tree. In binary tree using parentid will check all below levels one by one when find place then child will be added.
Child should be added below O and as on . (Arbitrary Order)
eg
j
/ \
k L
/ \ / \
M N O P
/ \ / \ /
A B C D E