SolvEdge interview question

when to use the hash map and array?