3 ms·
As an example, I would call a function called "mergeSort" that takes O(n^2) time incorrect.
by cobbal 3y ago
As an example, I would call a function called "mergeSort" that takes O(n^2) time incorrect.
- tantalor 3y agoYou can have it fast, or correct, or both, or neither. Here's an extremely fast sorting algorithm that's incorrect: function cobbalSort(arr) { return arr; }