Instead, the PM might say "We need a system which can count how many unique events of each type has occurred in the last 100k requests, with small impact to time, high accuracy, and up to 100mb of space"
But even that would be unusually specific. It would usually be: "the service breaks sometimes, can you figure it out?" And then the engineers figure out that it's because of unusual event distributions, and they figure out what needs to be done, how much space / time they can afford to do it, etc. For instance, do you trade off accuracy by having a periodic job flush old events out of the map? Do you quantize by time to save space at the cost of resolution?
That's what I do at my job, and that's the kind of question I see in interviews. If a candidate is expecting to have the algorithms dictated to them, then I would not consider them to be a software engineer.. coding up a program from a specification would have been a technician's job 30 years ago (now largely automated by compilers, synthesizers (for HDLs), and other tools). The software engineer should be coming up with solutions, which often involve using algorithms and data structures.
If your goal is to simply know how someone explores a problem, fine I guess. I don't agree with your approach but I can see your point. But if you expect a working implementation, that's unreasonable in my opinion and I believe you'll be rejecting many fine candidates using that method.
Don't you have release deadlines, even if they're measured in weeks?
Depending on the complexity of the problem, I've been expected to produce code. That tends to be tricky and I don't always get it 100%, but I've not finished my code and gotten just the general direction, and still passed (received the offer).
> you'll be rejecting many fine candidates using that method.
I could see that being true. Without knowing what kind of company you work at I wouldn't know. Since I work in a big tech company who interviews in this fashion, all my coworkers who I'd consider fine candidates have passed this (partly arbitrary) bar.
It's not something I was good at, but I decided that I wanted to work at a big tech company, so I decided to play the interview game.