Coding Interview Tutorial 34: Symmetric Tree (Iterative) [LeetCode]

preview_player
Показать описание
Learn how to check if a tree is symmetric, using iteration, in O(N) time and O(N) space.

This is an important programming interview question, and we use the LeetCode platform to solve this problem.

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

Thank you, this is easy to understand!

akankshapawar
Автор

For those who are confused by the use of the "offer" method for queue: The offer method inserts the specified element into the queue if it is possible to do so immediately without violating capacity restrictions. This method is preferable to add() method since this method does not throws an exception when the capacity of the container is full since it returns false. Source: geeks for geeks

fiazB
Автор

helps in removing my fear of tree questions

utkarshkumar
join shbcf.ru