If the answer is yes the input is sorted, then that context should have been given in the original prompt as it is a completely different question.
This is a great clarifying question. Ambiguous from the prompt.
> what shall I return if there are multiple numbers meeting the criteria
This is a decent clarifying question. I think it is better expressed as a clarifying point instead of question--mention to the interviewer your thinking out loud; something like "if there are multiple options, I'll return an arbitrary pair". Ask if they are okay with that.
> is the list sorted
If I were the interviewer, this question would almost make me dock points off of the interviewee. Maybe not that strong as I do try and ensure people are as comfortable and open as possible in asking clarifying questions, but this barely qualifies as a clarifying question in my opinion. It is almost irrelevant to the prompt; if the lists were sorted and the interviewer failed to mention / there was some "trick" that they expected you to clarify, that would be an awful interview question.
That being said, overall agree with the sentiment and yes you should try and always ask clarifying questions and ensure you understand the problem statement.
If I were the interviewer, this question would almost make me dock points off of the interviewee
Why? Knowing that can be a useful filter to reduce the search time and space, assuming whole numbers only.
It took me 45 minutes at the Births/Deaths/Marriages office. If I recall, it cost $60.
"ML expert" is the new "web developer"
(though I do understand what you're getting at)
I work as a contractor in Stockholm (long term assignments; basically like employment but I pay my own taxes), and I can save ~80k usd per year (after expenses and taxes, no family though, but I live in the city center). To get paid more, I either have to specialize hard or move to Silicon Valley.
Anyway, I generated a password using KeePass with I think 60 characters and pasted them in without error or warning. Turned out that only the first 20 characters got pasted in and the rest were silently rejected.
When I tried to log in I kept getting an invalid password error. No indication that the password I was trying to use was too long.
Only when I tried to change my password and type one in manually did I notice that nothing was getting entered after the 20th character.