Re:Why 37signals Doesn't Hire Programmers Based on Brainteasers
by mekazu on Thursday January 05, 2012 @09:39PM
(#3431682)
I should have set a timer on this one but I think it took 10 mins. This is what I ended up with in javascript - notice that it can print the whole triangle as a by-product of the implementation, but also because I have a (bad) habit of doing more than just what was required. Most of the implementation (testing) issues I suffered were due to lack of js knowledge (where is clone?) but the original skeleton of code that I wrote just thinking about the problem didn't need to change. I wouldn't have got it exactly right without a debugger though.
Ignoring the whitespace and clone functions, is there a much simpler way of doing this?
[ Parent
| on HN ]
There are no comments on this comment yet.