Pergunta de entrevista da empresa Mindbigger

How to decide between HashMap and TreeMap?