4 ms·
One aspect of the solution which I haven't seen touched on is that this is a problem for which a straightforward greedy approach works. I know when I do competi
by pfedak 4y ago
One aspect of the solution which I haven't seen touched on is that this is a problem for which a straightforward greedy approach works. I know when I do competitive programming, "will greedy work?" is usually the first question; greedy strategies are natural (here there's the insight of going backwards, true), and often it's faster to just implement it and submit than actually prove it to myself.
The output doesn't give me much confidence that, if we tweaked the problem slightly to make the greedy approach not work (e.g. certain characters/positions can't be replaced with backspace), we'd still get a working solution out. We might get something that looked extremely similar to this, but didn't actually solve the problem.
As I said, this isn't too different from what I'd consider human performance on these problems, but it makes being able to trust the output (and the model's confidence in the output) even more important.