Dear prof Joshi and others

I and my friends have come across questions few times in quant type interviews which we had never seen before.For ex

1.Write pseudocode to do Knight's tour on a 8*8 chessboard.

2.in O(N) complexity achieve the goal of finding two equal elements among N elements(N-2 distinct and Biggest element >N and smallest <0 ).

etc. My question is may be it is someone's mistake not to be aware of these kind of standard problems.But if one is not aware of these then without hints it's difficult to achieve this in an interview.

1.So do all the successful quants(successful in interviews ) answers smartly questions they hav never encountered before ?

2.Any advice for any exercise books or any thing else apart from Prof Joshi's Interview Book to work out on especially two areas puzzles and probabilities.. relevant to quant interviews , probability I mean the RWs and those relevant to quant potential interview questions , not stochastic calculus.

Thanks