Edge case 5 is failing

@aritra-crio-ta @krishnadey-crio-ta , How am I suppose to calculate the length of the given lists? if I tried to do that, it’ll take extra O(Max(M , N)) time. Will it be ok ??

I Think you are not familiar with the concept of time complexity.
You can take the length of the list at one time.
So your complexity would be either O(M) / O(N). depending upon the size of the list you have.


Yeah, it was / instead of +. Thanks for pointing out.

Anyway, the issue is resolved, I changed my method to find the intersection.

Closing this topic as it has been solved by you yourself. Great job, keep working hard. if its not resolved feel free to un-mark the accepted solution to re-open the topic.