Binary Tree Level Order Traversal in Java

Good evening. Hope you are doing well. As I mentioned in the prior post, yesterday I attended a webinar and was able to watch a software engineer in a mock interview solve two programming problems. This post deals with the second problem. My approach is different to the one used by the developer on the webinar. If you follow this blog, you should have looked at the code that I have written to handle processing binary trees. In most examples involving a binary tree LeetCode uses the TreeNode class for the nodes. The problem in the webinar did not make any reference to LeetCode, but I like to solve problems in sites that offer extensive tests. That way one can be relatively sure that the solution is bug free. Continue reading “Binary Tree Level Order Traversal in Java”