Right view of Binary Tree using Queue | GeeksforGeeks

preview_player
Показать описание

This video is contributed by Anant Patni

Please Like, Comment and Share the Video with your friends.

Install our Android App:

If you wish, translate into the local language and help us reach millions of other geeks:

Follow us on Facebook:

And Twitter:

Also, Subscribe if you haven't already! :)
Рекомендации по теме
Комментарии
Автор

What? This is simply do {cout << node->data << "\n"; node = node->right;} while (node); Why would you even bother with the left side of the tree or a queue, other than for the pointless reason that this "solution" should employ a queue and its size function to determine when you're at the right-most node?

xf
welcome to shbcf.ru