Closed kammitama5 closed 7 years ago
Very cool! I really like the graphics!
Oh, so you mean O(N^2) is squared, not simply twice. That would explain the ^2 part. I think I meant that. Thanks for the catch.
Dare I ask, why mention "Quadratic time complexity graph"? What detail does that add that "Squared" does not?
Meee tooo!! Haha I think you probably meant that too! Oh...I guess I think about it in terms of a quadratic function...I've been doing some Matlab and laTeX lately (plus reading Math Overflow/TeX overflow and nLab. nLab is a great resource! (=>https://ncatlab.org/nlab/show/algebra+for+an+endofunctor ).
so thinking of everything as matrices...as my friend would say; in FORTRAN, such a function would be something like a column matrix (if you have a matrix of 2x2 {2 2 3 3) how would you get one of the 3s? In most programming languages you'd have to do a nested for-loop..for i in j..where i gets the outer loop/row or 2 2 and 3 is the inner loop(column), hence an n squared complexity) or a nested function(for i in j..for i in j). for (i = 0; i < N; i++) { for (j = i+1; j < N; j++) { sequence of statements } } http://pages.cs.wisc.edu/~vernon/cs367/notes/3.COMPLEXITY.html
The term is quadratic time according to wiki, but it's essentially the same thing as alluding to n squared. " (quadratic [which is just a math-y way of saying "squared"] vs linear)" https://justin.abrah.ms/computer-science/how-to-calculate-big-o.html
whoops..do I close it now? Hope all is well :)
Oh, no. I'll close it when I've updated the readme for accuracy. :smile:
@kammitama5 thanks! I think that really improved the readme!
O(N^2) is a quadratic time complexity graph, or squared (n n or i j) (ie worst case), not times two.
I really enjoy your Scrum notes and your Github in general, btw :) Also, this is neat. My prof showed us this in Java class :) https://www.toptal.com/developers/sorting-algorithms/