Hacker News new | ask | show | jobs
by nathell 2656 days ago
Doesn't appear to be very accurate.

https://boat.algorithm.city/analyzer/?&f=N*lg(N)*lg(lg(N))

"The Big Theta of N * lg(N) * lg(lg(N)) is O(n * lg(n))"

1 comments

Thanks for the feedback and good catch!

The list of big O classes is the following:

   var classes = [
      define_func("0"),
      define_func("1"),
      define_func("lg(n)"),
      define_func("sqrt(n)"),
      define_func("n"),
      define_func("n * lg(lg((n)))"),
      define_func("n * lg(n)"),
      define_func("n * sqrt(n)"),
      define_func("n**2"),
      define_func("n**3"),
      define_func("n**4"),
      define_func("2**n"),
      define_func("n**n"),
      define_func("factorial(n)"),
      define_func("2**(2**n)"),
      define_func("n**(n**n)"),
    ];

lg(lg(N)) is very small, for 1e30, the value is approximately ~6 and at 1e60 it is ~7.6, at which point lg(lg(N)) is pretty much a constant value (or trivial), but yes - it is technically included in the growth rate, but for practical purposes can probably be ignored