We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Tree: Height of a Binary Tree
Tree: Height of a Binary Tree
Sort by
recency
|
992 Discussions
|
Please Login in order to post a comment
Java 8
node:internal/streams/writable:474 throw new ERR_INVALID_ARG_TYPE( ^ TypeError [ERR_INVALID_ARG_TYPE]: The "chunk" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received type number (6) at _write (node:internal/streams/writable:474:13)
getting this though solution is fine :/
I've consistently been getting "We couldn't process your submission" errors for a solution that passes all tests for several days in a row.
def height(root): if root is not None: left_height = height(root.left) right_height = height(root.right) return max(left_height, right_height) + 1 else: return -1
py code