I'm of the opinion that the only valid type of coding question in an interview is one that tests the candidate's ability to perform the actual type of work they are being hired to do.
If you were trying to hire a mechanic, would you first give them a sudoku puzzle to measure his "cleverness" (and then use that as a predictor of their car repair abilities)?
Aren’t these really just the same thing as the brain teasers that have already been disavowed by most companies? Anyways, even many Leetcode questions involve “tricks” that we just have to deal with.
why not? they are trivial. not “trick” in the sense of poor questions which are easy enough once you’ve studied the problem for 20 years and know some trivia that is rare knowledge, but are otherwise insanely difficult.
i think these are good. TELL the candidate they are trick questions. again, they are trivial. i was actually disappointed.
Better questions are those that more closely simulate a work sample, being aware that an interview is high stress and time boxed and thus not actually like work. I like an hour or more pair programming in a language the candidate is comfortable with on a simplified problem with some relevance to work.
For more senior candidates, you definitely wouldn't want to waste everyone's time with brain teasers because if the high risk of a hasty rejection - a deeper probing into systems they've built and and designed in the past, with an angle on relevant problems for the business, along with the pair programming.