Trip.com Group Interview Question

In what case should we use Hashmap and why?