Mindbigger interview question

How to decide between HashMap and TreeMap?