I was solving a ques on leetcode and after submitting my brute force solution, I looked up optimal solutions and found "two pass hash table" and "one pass has