Ad
  • Default User Avatar

    My solution uses the intended two-pass method; now that you've solved the kata you can take a look at it. Both algorithms are O(number of pixels).

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Thanks for authoring such a great challenge! After a few days of working on this kata, a fun mix of mathematical and programming insight finally got me a rather efficient solution!