SolvEdge Interview Question

when to use the hash map and array?