Companies throw in these algorithms questions because otherwise newcomers would never be able to outperform experienced candidates. Veterans have domain knowledge and experience on their side, while newcomers can impress with algorithms knowledge.
I’ve got a big issue with some of the parts of your story.
Steven Helferich
1

Makes perfect sense if hiring for an entry-level job.

Makes absolutely no sense if hiring for a senior-level job, because one of the requirements for those is usually X+ years of experience, for some reason.