We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
The time out error was because you weren't explicitly making A and B as sets.The inputs have duplicate values in A and B and we need to remove them. My code was also facing the same problem but now it's fixed.Have a look at this-
No Idea!
You are viewing a single comment's thread. Return to all comments →
The time out error was because you weren't explicitly making A and B as sets.The inputs have duplicate values in A and B and we need to remove them. My code was also facing the same problem but now it's fixed.Have a look at this-
I agree that it's complexity is O(n) which is greater than O(m) and it takes one temperory variable.