Im not sure I agree with the premise that interview questions like that that may never come up in the job are useless. To me it doesnt matter. They are easily solvable and any competent programmer should be able to solve them.
Of course I think more relevant questions are obviously better.
Of course I think more relevant questions are obviously better.