4 ms·
Yes, that's another good solution. You can't really compare O(P + R) and O(P log P). Of course, you could argue that P could grow a lot faster than R, so O(P
by gaylemcd 11y ago
Yes, that's another good solution.
You can't really compare O(P + R) and O(P log P).
Of course, you could argue that P could grow a lot faster than R, so O(P + R) would be better. That's probably true in a "real world" sense, but not in a mathematical sense.