What does mode mean?
Is it a binary tree or a binary search tree? The question says binary tree. The first line of the description says binary search tree. The example is that of a binary tree.
Initially I thought that mode was a typo for node and I was supposed to return all the nodes of the tree. Then after looking at the example I thought that we are supposed to return the node with maximum duplicates.
Finally it hit me that mode here refers to mode as defined in statistics. Nevermind the 20 minutes that went by in between all this and multiple Google searches and cuss words for the question setter.
EDIT: Both the problems have been fixed. For future contests please proof read the questions. Thanks
@piy9 Thanks so much for your suggestion and feedback. Sorry for the mistake and inconvenience caused. We will proof read the questions and ensure this will not happen in future contests, thanks!
@1337c0d3r : Sorry for the rant earlier. The question got me very worked up. Glad to see that you are taking regular feedback from users.