Hello,
I intervewed for Google Paris, the question was:
Find all common elements in two integer BSTs.
I used two DFTs for the solution, the first one adds the elements of one tree to unordered set and the other one search the elements in the set. However, this is not the optimum solution absolutely.
I suggested another solution without using set but this time it was worse in runtime complexity.
I did the interview last Tuesday and there is still no answer, is this normal? Do you think I was only asked one question instead of two because I was too slow, or is it possible that they ask one question only?