Diameter Of Binary Tree
Given a Binary Tree, find and return the diameter of input binary tree.
Given a Binary Tree, find and return the diameter of input binary tree.
Elements in level order form (separated by space)
(If any node does not have left or right child, take -1 in its place)
diameter
8 3 10 1 6 -1 14 -1 -1 4 7 13 -1 -1 -1 -1 -1 -1 -1
7
Comments
Post a Comment
Please give us your valuable feedback