One other thing that I've seen come up with this problem is an interviewer telling me that I could assume that the given array was already sorted. I said well that's interesting, usually I get told that it's unsorted so you can never be sure. You can make some weird search algorithms using the idea that the array is already sorted. I can't remember exactly what I did but I think it was a rough binary search from there.
The interviewer asked "what would you do if the array wasn't sorted then?" I looked at the board and went "sort it first, before passing it to the function." We both had a good laugh.
Ha! Well that also says a lot for interviewing skills of asking clarifying questions and explaining your thinking. You definitely have to display technical skills, but at the end of the day you have to convince the interviewer that they'd want to work with you.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
One other thing that I've seen come up with this problem is an interviewer telling me that I could assume that the given array was already sorted. I said well that's interesting, usually I get told that it's unsorted so you can never be sure. You can make some weird search algorithms using the idea that the array is already sorted. I can't remember exactly what I did but I think it was a rough binary search from there.
The interviewer asked "what would you do if the array wasn't sorted then?" I looked at the board and went "sort it first, before passing it to the function." We both had a good laugh.
Ha! Well that also says a lot for interviewing skills of asking clarifying questions and explaining your thinking. You definitely have to display technical skills, but at the end of the day you have to convince the interviewer that they'd want to work with you.