Personally I've almost never asked algorithm questions to candidates in interviews. I feel like the typical algorithms in these questions are hard enough that if you don't know it/remember it you'll struggle to come up with it in a few minutes during an interview, while also being easy enough that if you do remember it, it won't be too hard to come up with an implementation. E.g. dijkstra's algortihm is really simple once you know it, but dijkstra was a pretty clever fellow to come up with it in the first place... So it ends up being largely a knowledge-focused question, which isn't the best.
When I'm interviewing a junior, I'm actively looking for pockets of knowledge and understanding in a sea of ignorance (the field is too vast for anyone, but especially for someone newer to it), so knowing they don't know a specific thing doesn't tell me much: they don't know most things, and that's ok. I might ask an algorithm question to a recent CS grad who tells me that algorithms and data structures was one of their favorite classes. When I'm interviewing a senior candidate, asking an algorithm question would likely measure how much interview practice they did to remind themselves of all that stuff, more than how good an engineer they are.
I guess there are some super-simple algorithm questions that can be used to filter out the people who can't code at all (e.g., fizzbuzz, or insert into linked list or such), but any kind of programming task will probably do for that purpose.