3 ms·
Or those two should have been combined into O(nlogn) via sorting.
by Tade0 7y ago
Or those two should have been combined into O(nlogn) via sorting.
- 52-6F-62 7y agoOr if you've already made allowances for the memory usage, you can also check to see if you can write your O(n^2) nested loops as O(n) + O(n) depending on the shape of your data.