Recovering interrupter with occasional relapses, lover of spreadsheets, blogger, programmer, adept debugger, conjurer of analogies, and probably other things.
That's also just about what I would write for my own use, possibly putting the limit = 1 + array.length/2 on a separate line, then returning array[0..limit], to reduce the amount of things happening at a time.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
(This is from my phone so please check my memory.)
That's also just about what I would write for my own use, possibly putting the
limit = 1 + array.length/2
on a separate line, then returningarray[0..limit]
, to reduce the amount of things happening at a time.