“Hey, can I stop you there for a minute? This interview style isn’t really working for me to the point that I’m considering cutting the interview short and heading out. Here’s why …” - and then have that conversation. Some people will take that badly - and that’s fine. But I have no idea what will happen next after saying something like that. And that makes it an interesting direction to take it.
I generally ask the purpose of the question.
Sometimes there are valid reasons for why they look at very strong algorithm skills and then I simply admit it's not really my cup of tea nor my passion.
Sometimes they answer variations of "it's standard/it's how we do it" so then I propose whether we would like to code something more similar to what the daily job would be to which they generally play along, even happily.
But if some don't I then say that I don't see a fit.
Might be awkward but...who cares? I don't, they won't after 5 seconds the interview's over either.