Had the worst experience in two of my coding interviews. According to my interviewer, BFS on a binary tree has a time complexity of O(n^2). When I tried to explain it is O(n), he said "don't teach me how big O notation works". I was using a queue to do BFS and hash table (for storing parent info for each node for additional requirements in problem) and I said the space complexity is O(n) for which he again didn't agree. The nexy interviewer gave me a LC hard that had a tricky mathematical solution. I proposed a naive solution first and then a better solution next. But he kept insisting on the mathematical one. Then, we proceeded on to mathematical solution but my guess is that he didn't fully understand how mathematical solution work, so he couldn't give good hints to complete it. So, we fell back to my earlier one. Worst of all, I wrote my code in C++ and he said he thought it was Java even when my code had some C++ unique constructs. My other interviewers were nice and knowledgeable. Just a heads-up for you guys if you are having an interview with them.
What if he thought n is the square root of number of nodes in the binary tree? This is unfortunate, I had a similar experience with one interview at Google. The interviewer disagreed with my time complexity. I just reworded and recoded the same solution in a different way and the interviewer agreed that this time the time complexity was correct. The interviewer is L5 at Google, blew my mind.