Given a Binary tree. Find the level in binary tree which has the maximum number of nodes.
/ \ \
4 6 8
Explanation: The level 2 with nodes 4,
6 and 8 is the level with maximum
number of nodes.
You don't need to read input or print anything. Your task is to complete the function maxNodeLevel() that takes root node of the treeas input and returns an integer which is level of the tree with maximum nodes. The root is at level 0. If two or more levels have same number of maximum nodes , then return smallest level.
Expected Time Complexity: O(N). Expected Auxiliary Space: O(N).