Frage im Vorstellungsgespräch bei Bloomberg

How would you implement Snake? How does a hash map work?