root of a binary tree. Return True if every node of the tree holds the same number, and False otherwise.root=tree_node([4, 4, 4, None, 4]) → True
All four nodes hold 4.
root=tree_node([3, 3, 3, 3, 8]) → False
One leaf holds 8 while the rest hold 3.
root=tree_node([4, 4, 4, None, 4])
True
Run checks the first 3 tests in your browser. Submit checks all 79 tests on the server, hidden ones included.