3 ms·
even w ordered data, sorting is O(n) isn't it?
by andrewcooke 13y ago
even w ordered data, sorting is O(n) isn't it?
- sp332 13y agoOrdered data? Lookups into sorted data can use a binary search and are only O(log n).
- andrewcooke 13y agobut you need to move n/2 to "make room" - think of the whole process. edit: you're not wrong, but what i am saying is that to make the filter practical you have to save the new point, too. sorry for brief comments. on vacn w tablet only.
- deleted 13y ago[deleted]