No post body was provided.
Untitled topic
1–9 of 9 posts
Re: undefined
#2The author notes all of the issues with this implementation, but I've just got to note this summary of the halting problem: http://www.lel.ed.ac.uk/~gpullum/loopsnoop.html
Re: undefined
#3Just a reminder - seeking the lowest O doesn't always improve performance. Sometimes the startup cost for a lower O algorithm is too much.
Re: undefined
#4Just a reminder - seeking the lowest O doesn't always improve performance. Sometimes the startup cost for a lower O algorithm is too much.
See Galactic Algorithms for examples!
Re: undefined
#5Better to tune this out even if you're a beginner. You normally don't say "The big O of the algorithm is ..." because it's ambiguous whether you are talking about time complexity or space complexity. Also, when someone says O(n), then n has to refer to something, normally the input size. The text area doesn't even have you define your input, and will say things like
for (i =0; iis O(N), without even knowing what x is (could be a constant).
Re: undefined
#6This hardly works at all so I am skeptical of the benefits it offers learners. Even using just for loops it gets tripped up and says the following code is O(n) when it isn't.
for (int i = 0; i Re: undefined
#7Is there some example code to try?
Re: undefined
#8Just a reminder - seeking the lowest O doesn't always improve performance. Sometimes the startup cost for a lower O algorithm is too much.
Also, in many cases, implementation details like cache locality mean that asymptotically inferior algorithms can in practice outperform those with a lower theoretical runtime complexity.
Re: undefined
#9Hmm, doesn't seem to work properly. Spits out a "Syntax error" for
for (let i = 0; i