News for hackers. Stuff that matters.
Re:72 hours to launch Celebrate Pride by facetube on Thursday July 02, 2015 @06:38PM (#9822202)
Okay, now I'm curious: how'd they manage to get O(n^2) asymptotic complexity out of what looks like a relatively simple semi-transparent photo overlay?
Re:72 hours to launch Celebrate Pride by Bahamut on Thursday July 02, 2015 @07:29PM (#9822427)
Probably a double for loop iterating over each row of pixels and then each pixel in each row (or column).
Re:72 hours to launch Celebrate Pride by placeybordeaux on Thursday July 02, 2015 @09:40PM (#9822914)
That sounds like it would only touch each pixel once: the minimum amount of times.
Re:72 hours to launch Celebrate Pride by facetube on Thursday July 02, 2015 @10:22PM (#9823037)
Right, that's why I'm confused. If n is the number of pixels, then 4 million operations would be linear-time as far as I can tell. Wonder if the author took n to be the width/height of the image.