3 ms·
I believe you that this works, but I can’t easily read or comprehend it without considerable effort, so I’d grade it below a solution I could.
by MrDarcy 1y ago
I believe you that this works, but I can’t easily read or comprehend it without considerable effort, so I’d grade it below a solution I could.
- gloosx 1y agoIf this is given in Javascript, I'd rate the promise solution higher since a Javascript job involves a ton of promisified async code like this. If this is given in C or pseudo-code, then for sure a good ol stack+flag+loop is looking good enough.
- craftkiller 1y ago> without considerable effort Are you sure? I'm not a javascript programmer and it took less than 2 minutes to comprehend. If you think this takes considerable effort to comprehend then I don't think you actually tried.