Amazon Interview Question

Balance binary tree, how hashmap works in java