3 ms·
Quadratic complexity causes the runtime to grow quadratically ;-) - Quadratic = x^2, e.g. 0,1,4,9,16,25,36,49,64,81 - Exponential = n^x, for example 2^x, e.g.
by w0utert 7y ago
Quadratic complexity causes the runtime to grow quadratically ;-)
- Quadratic = x^2, e.g. 0,1,4,9,16,25,36,49,64,81
- Exponential = n^x, for example 2^x, e.g. 1,2,4,8,16,32,64,128,256
Already very bad for small x even if n=2, but for n higher than 2 you can imagine you will run out of time very, very quickly ;-P
- oneplane 7y agoI always thought of Quadratic to be exponential but specifically 'N to the 2nd'. I suppose that does actually make no sense whatsoever. Thanks.
- enedil 7y agoThat is wrong, because quadratic means that the variable is in the base, while exponential will tell you, that the variable is in the exponent (just as the name tells).
- boneitis 7y agoAh, what you're looking for is "polynomial but specifically 'N to the 2nd'" :)
- oneplane 7y agoThat makes a lot more sense! Actually rings a bell from when I ran in to the same wrongly-remembered wording in uni. I'm not sure why, but getting back to the right terminology/vocabulary just to get back in to the basics of mathematics is a lot harder for me than it was 20 years ago.
- boneitis 7y agoIf you casually want to get into it without the commitment, I've found that even passively watching the Tim Roughgarden videos from Coursera (probably can be found crossposted to YouTube by third parties) to be stimulating in the past. If you seek to acquire formality and rigor, I can't help you there; I figure shortcuts will be nonexistant ;)