Ad
  • Custom User Avatar

    O(1) is much better than O(n), good job all!

    It's a tossup about whether to divide by 2 and then square or to square and then divide by 4. Since Ruby doesn't overflow, I picked the latter.