Spoke with internal recruiting and had a great conversation, in which I was asked questions relevant to my background, expertise and aspirations. They scheduled a technical interview that would be conducted by the hiring manager for the role.
During the interview with the hiring manager, things started off very positive, with more back and forth conversation about the role, the team I'd be joining and how my experience fit in. I would note 2 red flags that encountered during this first part of the interview. 1) I was cut off mid sentence on 2 responses. Basically, the interviewer wasn't interested in hearing my pitch and expected that I would answer questions more simply, without bringing in other context that I felt was relevant. 2) There was a tone of arrogance in some of how the interviewer described their ability as a manager of technical personale. Both of these I brushed off because it is easy to misinterpret in the moment.
When it came time for technical portion of the interview, I don't recall the exact platform but it was purely a text editor with no compiler or intellisense. The problem presented was inverting a binary tree. The interviewer made it clear that I was to talk through my thinking as we went. I struggle to talk and write code, so this is a very bad format for me: a high pressure, timed exercise, in which I am supposed to talk before I type.
The editor loaded with a TreeNode implementation and the invert function accepting a TreeNode named root. So I started talking about a recursive solution in which we check for root not equal null, and then call invert on the left and then on the right. This is a classic recursive solution to a classic problem space, except that the interviewer wanted me to solve it without recursion. I gave this some thought and my mind was coming up blank for alternatives. I resisted the idea of avoiding recursion and was told that I would need to solve it without recursion if he would consider my solution complete. In that moment I was stuck, unable to come up with the Queue-based non recursive solution. So I fumbled around trying to think of how to solve it with while loops. I made several attempts to start writing code, since there are times where writing any code, even the wrong code will get me thinking about alternatives. Any time I would start to write code, I was told to stop and describe to him the solution I was thinking of. I admitted that I was stuck, and couldn't get the recursive solution out of my head. After a few minutes of this anguish, he called time and then told me I had 5 minutes to ask him questions. At this point, feeling very rattled, and struggling to disengage from solving the problem, I asked if this was an intentional part of the interview, to see if I can disengage. At this point the interviewer was stone cold and said that he had more important things to do, that he can't spend all day at this.