• + 0 comments

    Hi,

    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.

    https://www.youtube.com/watch?v=hDhf04AJIRs&list=PLSIpQf0NbcCltzNFrOJkQ4J4AAjW3TSmA

    Would really appreciate your feedback like and comment etc. on my video.