You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would you be okay with adding something to the README stating what the time complexity of the algorithm is? My understanding from looking at the code is that it's O(n log n), but I'm not sure if that's correct.
Thanks :)
The text was updated successfully, but these errors were encountered:
If you call arrayDiffer(a, b) and m = a.length, n = b.length, then turning b into a set takes O(n * log n) because inserting a single element into the set takes O(n), and filtering a takes O(m * log n). To summarize, the complexity is O(max(m, n) * log n). But that's a worst-case analysis which might be irrelevant in real life.
Would you be okay with adding something to the README stating what the time complexity of the algorithm is? My understanding from looking at the code is that it's O(n log n), but I'm not sure if that's correct.
Thanks :)
The text was updated successfully, but these errors were encountered: