Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Why 37signals Doesn't Hire Programmers Based on Brainteasers. Parent comment
My implementation in 15 min using javascript. BTW I'm a freshmen CS major.
function row(len){
if (len==1){ return [1] }else{ var p = row(len-1), arr = []; for (var i=0; i<len; i++){ if (i==0){ arr.push(p[0]); } else if (i == len-1){ arr.push(p[i-1]); } else { arr.push(p[i]+p[i-1]); } } return arr; } }
There are no comments on this comment yet.
My implementation in 15 min using javascript. BTW I'm a freshmen CS major.
function row(len){