I recently stumbled upon this screenshot while researching social media on the train. Of course, it was followed by a cascade of spiteful comments, criticizing this fresh programmer’s attempt to solve a classical problem in computer science. The modulus operation.
Yeah but then ALL even numbers would be slow to compute because you would have to chain through every odd before you know that
2
is even.Depends on the expected distribution of input values