Recursively, anyone can traverse the binary tree but it takes O(N) time and O(N) space [function call stack]. To reduce the space complexity, Morris Traversal is used.
Programming language
[x] C++
[x] Python
Are you contributing under any open-source program ?
Description
Recursively, anyone can traverse the binary tree but it takes O(N) time and O(N) space [function call stack]. To reduce the space complexity, Morris Traversal is used.
Programming language
Are you contributing under any open-source program ?
Hackclub RAIT Summer of Code