I just failed Amazon phone interview. The interview asked me some questions realted to Subtree of Another Tree, which I wasn't able to answer them correctly.
I thought it's O(N) to search a value without a key. Is it using a hashset since it can search a value in O(1)