Liron comments on Quixey Engineering Screening Questions - Less Wrong
You are viewing a comment permalink. View the original post to see all comments and the full post content.
You are viewing a comment permalink. View the original post to see all comments and the full post content.
Comments (22)
The first question is legitimate. The second one sure looks like a trick question to me. You've forbidden both loops and any recursion that would use O(n) space if it wasn't tail-call optimized (even though a real compiler would do that optimization), so the solution pretty much has to be a piece of library or language trivia that uses a loop behind the scenes.
The solution is definitely not language/library trivia. In fact I will accept a solution in any language if you don't use iterative constructs and you don't rely on tail call optimization to limit your asymptotic space usage.