Diameter of Binary Tree

# Introduction In this challenge, we will be writing a JavaScript function called `diameterOfBinaryTree` that computes the length of the diameter of a binary tree. The diameter of a binary tree is defined as the length of the longest path between any two nodes in the tree, which may or may not pass through the root. We will be given a binary tree object as input and our task is to determine the diameter of the tree.

|
60 : 00

Click the virtual machine below to start practicing