Search
⌘K

Leetcode 965. Univalued Binary Tree

Check whether every node in a binary tree has the same value as the root; return true if all nodes match, false otherwise. This can be done with any tree traversal (DFS/BFS) comparing node values to the initial value.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.