def diameter(t):
"""
Adapted from: http://www.geeksforgeeks.org/diameter-of-a-binary-tree/
Return the diameter of input tree t.
The diameter is defined as the number of nodes on the longest path between
two leaves in the tree. Here are some examples
(X indicates nodes on the diameter path -- ignore the red slashes):
Hint: you may use the function height(t).
diameter: 4
X
/ \
X X
/ \
O X
diameter: 5
O
/
X
/ \
X X
\ \
X X
"""
"""*** FILL IN THIS FUNCTION ***"""