Solution to 6346: Depth of arithmetic expressions
See code at solutions/code/tutorialquestions/question6346
Take a look at the sample solution code. The solution is pretty straightforward. Note that the Math.max
static method is used to compute the depth of a binary expression, by comparing the depths of the left and right sub-expressions.