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?
[ Parent
| on HN ]
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.
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.