LeetCode 965 | Univalued Binary Tree | Solution Explained (Java)

preview_player
Показать описание
A binary tree is univalued if every node in the tree has the same value.

Return true if and only if the given tree is univalued.

Running Time: O(N)
Space Complexity: O(H)

Always be pluggin:
Рекомендации по теме
Комментарии
Автор

I am sorry for the audio bugging out at certain places in the video. I am not sure why it’s doing that

xavierelon
Автор

question the way you did the return statement, is that a short hand way of making it recursive or is that the only way cause I put my recursive calls on on top of the other and it kept giving me the wrong answers.

spider
Автор

Why don't you just copy and paste?

HenggaoCai