O(n+m) O(1)