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.
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.
Array Manipulation
You are viewing a single comment's thread. Return to all 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.