4 ms·
I agree I think it's not a great problem but it's worth knowing: some problems we're designed to have an obvious answer and allow the proctor to guide you to th
by kjeetgill 8y ago
I agree I think it's not a great problem but it's worth knowing: some problems we're designed to have an obvious answer and allow the proctor to guide you to the ideal one.
This has the nice property of acting like a fizzbuzz and a sample of how do I work on hard problems stage. The first part is pretty pass fail the second is observational. This unfortunately requires a better thoughtful proctor which isn't always the case.
If I had a candidate that couldn't do the (n^2)/2 solution that's pretty bad. It's nested fors, man. Bang out in like 10 lines.
Still though, I agree, not great.