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.
I was surprised by this problem...After I improved my solution from O^3 brute force to O^2, it still gives me timeout for some cases. Then I speed it up by pruning some cases, then there's still one case that's timing out. Finally I found another small place to prune, and it worked...I wonder if this is how every one else do this problem
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Substring Diff
You are viewing a single comment's thread. Return to all comments →
I was surprised by this problem...After I improved my solution from O^3 brute force to O^2, it still gives me timeout for some cases. Then I speed it up by pruning some cases, then there's still one case that's timing out. Finally I found another small place to prune, and it worked...I wonder if this is how every one else do this problem