3 ms·
Part of the point of this style of challenge is that you're not given all of the test cases up front. And even if you are, you generally can't come up with thos
by teraflop 4y ago
Part of the point of this style of challenge is that you're not given all of the test cases up front. And even if you are, you generally can't come up with those "canned values" without actually figuring out an algorithmic solution.
As I said, some of the test cases for this particular problem can be strings up to 100,000 characters long. Do you really think it's faster to solve those by hand than to come up with a correct algorithm to do it for you?