Oracle Interview Question

They asked me to solve a data structures and algorithms problem, specifically involving arrays and hash maps, while explaining my thought process and analyzing the time and space complexity.