Find the length of the longest path between any two nodes in a binary tree. This path may or may not pass through the root.
{
"root": [
1,
2,
3,
4,
5
]
}3{
"root": [
1,
2
]
}1{
"root": [
1,
null,
2,
3,
4,
null,
null,
5
]
}3Sign in to Run Code and Submit