upvote
O(n + m) is also practically nice to give a general idea of what you mean, without spoiling anything for folks who are still working on it.
reply