Re:Array Iteration Interview Problem
by jazzychad on Wednesday August 01, 2012 @09:00PM
(#4326644)
yes, the count++ (and count variable itself) are unnecessary since I could just text n against 0 and then break. good catch.
[ Parent
| on HN ]
But decrementing n would still cost you cycles in the case where n was given as 0 that you wouldn't need if you had separated out that case, wouldn't it?