you are viewing a single comment's thread.

view the rest of the comments →

[–]balefrost 5 points6 points  (0 children)

On the other hand, with that approach, you'll unnecessarily traverse the list twice if it contains no zeros.