Amazon Interview Question

Hashmap, various trees and time/space complexity.