by fsk · 12y ago · 0 comments
That's a horrible interview question. If you know the trick (saw the question before), it's easy. If you don't know the trick, it isn't reasonable to expect someone to figure it out in 5-15 minutes.
That's a brainteaser question disguised as an algorithms question.