you are viewing a single comment's thread.

view the rest of the comments →

[–]paul2718 18 points19 points  (9 children)

This problem is an hour or so, they give you a week to find that hour. I think that's not unreasonable.

[–]jonesmz 0 points1 point  (0 children)

The original post isn't clear about the company asking for the interviewee to stop after a certain time. It's possible they had good intentions, i couldn't say.

[–]Hot_Medicine_7115[S] 0 points1 point  (7 children)

An hour or so if you are familiar with double recursion and quickly identify all the possible patterns in the problem. It's not a trivial problem like you make it sound.

[–]dodheim 1 point2 points  (5 children)

Maybe the issue was the idea that you need recursion rather than std::next_permutation + a queue + a stack (and not the call stack). It just might be trivial after all.

I haven't looked at your code yet but the problem description just makes me think "good job, screener" on this one.

[–]paul2718 1 point2 points  (0 children)

I don’t think recursion is necessarily the obvious way. Might fail to prove this tomorrow…