DEV Community

Discussion on: What is the worst question you have ever been asked in a job interview?

Collapse
 
sunitk profile image
Sunit Katkar • Edited

This was many years ago. Was asked how to reverse a string. Showed the standard String to char array and for loop. Was asked any other way? So I said that for production code, I would use the JDK StringBuilder reverse method.

Interviewer was not happy as I didn't mention recursive method. He kept on harping and I quickly wrote the recursive method on the whiteboard. I told him it's not practical. I told him politely that I would use the for loop for just discussion and interview purposes, the recursive method for academic discussion and the StringBuilder reverse string method for production code.

He was not happy and I didn't bother to go for the next round.

Collapse
 
aza profile image
Aza

Can you imagine working with him/her in the future?