Amazon interview question

Balance binary tree, how hashmap works in java