Walmart Global Tech interview question

Related to hash and java