I have participated interviews and have conducted interviews in the past. And recently, for the first time, I experienced the interviewer leading me down the wrong path in a technical interview
I am given an easy-medium problem. I restate what my interviewer says to ensure I understood them and what the problem is. Then, I say a couple assumptions and ideas about how an answer can be reached efficiently, and I say a general logic of how it can be reached. (My answer leads to recursion solution that has an iterative form.) I confirm with the interviewer if they see anything wrong with what I have said or if I am assuming something that I should not be assuming because I misunderstood something about the problem. The interviewer says that I did, and they tell me not to make a specific assumption.
I remove that assumption. So now I am stumped to having to tackle the problem via brute force, as I am unsure of what else can make the solution better in terms of O. They tell me to just implement the brute force solution, and then they tell me how I would make a solution better. Once again, I am thinking back to the recursion, but since the interviewer says I can't make a certain assumption, I write up the iterative form with a slight change that makes the solution a little bit better but not really, and then the interviewer tells me that recurion would work. And I say aloud that I have a recursion solution in mind, but it won't work because the assumption they said I should not make.
They then tell me to forget about they said and the interview ends.
Ater the interview, I decide to look up the solution. It turns out that the assumption I made was correct, and not only that, the solution I had in mind was correct.
This was with a well-known company, so I am unsure what to make to make of this. Are there interview guidelines that say that the interviewer should tell the candidate wrong information? Are the interviewer testing me to see if I will say that they are wrong? What am I supposed to make of this interview experience?