You are viewing a single comment's thread. Return to all comments →
Your solution is good but time complexity of your solution is O(n*m) which can not be used to solve this problem for given time constraint, so you need better approach which beats O(n*m)
Here is the video tutorial for my solution O(n+m) complexity.
Would really appreciate your feedback like and comment etc. on my video.