Horrible idea for a job interview. Perhaps for a junior position, or even for an internship, but not for a senior, or at least for minimally independent position. All of those problems are easily solvable with Google.
On the other hand, as a senior, you have to work with multiple different languages, technologies, paradigms and be able to to figure out best way to solve the problem, having multiple proposed solutions. Problems you referred are trivial, well known and deeply exploited.
From my experience, I had people who excelled at this kind of questions but failed at "as a java developer i won't touch js/html" kind of test. As a scrum master and main developer on the team I cannot accept situation where one of the members can't (don't want to) handle tasks other people do.
As interviewer I like this question: which features of java8+ are most important to you?
It gives the interviewee chance to gather thoughts, check if he is up to date and on which parts of the language he focuses. And there is no "bad" answer. All answers reflect how they think, what they focus on, and, honestly, if you rate people's creativity by number of algorithms they memorized, you'll assemble a team of losers who can't solve any problem unless it's already solved by a business analyst.
I don't want to work for you. Sorry.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.