Someone really said "let me check if a number is even" and decided to calculate logarithms, convert to binary strings, loop through bit positions with powers of 2, build the binary representation manually, extract the last character, and compare it to "0". You know what also works? number % 2 == 0 . Three characters. Done. This is what happens when you learn algorithms before learning to solve actual problems. It's like using a flamethrower to light a candle—technically impressive, wildly inefficient, and someone's probably going to get hurt.