The problem with these "interview questions" is that knowing a algorithms inside out is not how you solve problems it is how yiu solve A SPECIFIC problem. The problemsolving skill comes from the reductions one can make and thus apply different algorithms in order to solve a new problem.