Right View of Binary Tree | Right View of Binary Tree using Queue Java Code

preview_player
Показать описание
Given a binary tree, print right view of this binary tree. Right view of a binary tree is the set of visible nodes when it is visited from right side.

In this tutorial, I have explained how we can print right view of binary tree using queue (Level order traversal) and it's java code.

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

Thanks for walking through each level!

chelseaip
Автор

Hi ...
Thank you so much for the tutorials...
The quality of the video should be improved... It's barely visible... Even though I opt for higher picture quality still it's a problem ....

Otherwise excellent work.... really helping me... May god bless you

fairozahmed
Автор

How is the time complexity for this is O(n)? Shouldn't it be O(n^2) since there is a FOR loop is nested inside a WHILE loop?

randomaccessmemories
Автор

If the right view side of a tree uses a queue. Does this mean that the left view side of a tree uses a stack?

shawnsuzuki
join shbcf.ru