I mean sure? Swapping the pointers recursively is also fine. It's a question meant to see if the interviewee can talk about data structures or code, not to come up with a perfectly optimal working solution. Having a lengthy discussion about what "inversion" of a binary tree even means would even be totally fine imo.
I've interviewed a fair number of candidates and I ask them a very simple question with a bunch of edge cases and grade them based on how they talk about it, not the final solution.
I get the feeling that Max got frustrated and wasn't able to coherently speak about the problem, or the interviewer was dumb as rocks. I think both are equally likely.
the shitheadery is probably? due to the author being 19.