I am to show that log(n!) = Θ(n·log(n)). A hint was given that I should show the upper bound with nn and show the lower bound with (n/2)(n/2). This...
  • May 22, 2022
  • 0 Comments
This question already has answers here: What is a plain English explanation of “Big O” notation? (43 answers) Closed 4 years ago. I’m asking more about what this means...
  • May 15, 2022
  • 0 Comments
Are there any O(1/n) algorithms? Or anything else which is less than O(1)? 32 Answers 32 This question isn’t as silly as it might seem to some. At least...
  • May 11, 2022
  • 0 Comments
I understand Big-O notation, but I don’t know how to calculate it for many functions. In particular, I’ve been trying to figure out the computational complexity of the naive...
  • May 10, 2022
  • 0 Comments
After using PHP for a while now, I’ve noticed that not all built-in PHP functions are as fast as expected. Consider these two possible implementations of a function that...
  • May 10, 2022
  • 0 Comments