I've used this data structure plenty of time to represent a binary tree. The basic data structure consisting of a value, leftChild, rightChild is commonly used amongst programmers. So you are complaining about that? Secondly, i don't know if you could tell but this was an algorithm specific question, not a java one. My attempt was not to use language specifics, such that the algorithm was less dependent on a specific language. I mean if you just look at the problem, why would I go overkill and add generics if all the values at a node are ints.. Would you like me to check if the returning value was affected my overflow too ?