ByteDance interview question

It was about DFS and hash map