The interviewers are immature sometimes even not sure what to test and ask , they come up with the specific questions and their solutions in mind and expect the same approach and if you by chance have another they criticize .
If you tell a working solution ,they say it might now work ,on asking " could you please help me finding the issue " the reply was "it's very basic ,I won't tell you,find it your self "
They take interview to find reasons to reject you but not to know what you bring on the board .