3 ms·
You shouldn't be using O(n^2) algos at all, ever, unless the problem is well-constrained to be very small or there is no other possible solution. They fester a
by hoseja 3y ago
You shouldn't be using O(n^2) algos at all, ever, unless the problem is well-constrained to be very small or there is no other possible solution.
They fester and/or blow up regularly otherwise.
- professoretc 3y agoI've heard O(n²) described as the most dangerous asymptotic complexity, because it seems fine for small testing inputs but falls down when you throw real-world -sized data at it.
- nsxwolf 3y agoThis will never matter in, say, a site configuration dashboard where a set of options is generated quadratically from a couple small sets of data. There are some features that will never be used at any significant scale.