Pregunta de entrevista de Oracle

Valid anagram dsa question and basic hashmap question