>These sorts of screener questions are at the level of "can you write a simple function and can you answer basic questions about it"
Some interview questions are like that, but this wasn't one of them. This is not "implement simple functionality" -- for that, you would ask e.g. fizzbuzz or "reverse the elements of a list".
This one requires you to work out something clever that reduces the time needed compared to the brute-force solution. You'll notice that, in this case, even someone at the end of a 4-year computing degree had to think about it for a while to figure out the shortcut.
Yes, once you have the insight that it can be reduced to max(set) - min(set), then it's a matter of writing a simple program. But obviously, this question isn't testing whether you can implement max(set) - min(set) when told to do exactly that. If that's all they were testing, they would have asked him that directly!
It is, rather, to test whether you are generally smart enough to, within the time of the interview, think of such a solution when it wasn't handed to you. To present yourself as having come up with that insight on the spot, when it really took you hours, is a kind of deception.