Java Application to Calculate Minimum Tree Span