Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on IBM's Asshole Test. Parent comment
Umm, what?
void merge(int* d,int const* a,size_t za,int const* b,size_t zb) { size_t zd = za+zb,ia=0,ib=0; for(size_t i=0; i<zd ;i++) { if(ia < za && ib < zb) { if(a[ia] < b[ib]) d[i] = a[ia++]; else d[i] = b[ib++]; } else if(ia < za) d[i] = a[ia++]; else if(ib < zb) d[i] = b[ib++]; else abort(); // should have i==zd now } } void msort(int* d,size_t z,int const* s) { if(z==1) *d = *s; if(z<=1) return; size_t h = z - (z>>1); // round up int* x = malloc(h * sizeof *x); if(!x) abort(); // out of memory msort(x,h,s+(z-h)); msort(d+h,z-h,s); merge(d,d+h,z-h,x,h); } // not that this is any *good*, but it does *work*
There are no comments on this comment yet.
Umm, what?
Are you using a absurdly broad definition of what counts as memorizing something or something?