BMW Car IT interview question

I have got call from a Technical guy form BMW, he asked me to write Balanced Tree Algorithm in Java in scratch pad. So please be prepared the data structures.