2 ms·
You don’t need semantics. Just what is expected. If it deviates and returns to what is expected, it is a success. If it deviates and doesn’t return, it is incor
by withinboredom 2y ago
You don’t need semantics. Just what is expected. If it deviates and returns to what is expected, it is a success. If it deviates and doesn’t return, it is incorrect. The assertion is that all the digits are said, not that all the digits are said flawlessly.
- eurleif 2y agoSuppose the digit sequence is: "1, 2, 3, 4, 5". Someone says: "9, 2, 3 -- wait, the digit a few places back was a 1, not a 9 -- 4, 5". The pattern /^.*1.*2.*3.*4.*5.*$/ doesn't match; they didn't "deviate and return" in the way you seem to be implying; yet they've expressed the correction in a reasonable way that a human would understand.
- withinboredom 2y agoDepends on how you write the algorithm. As you mentioned, a regex won't work, but "1, 2, 3, 4, 5" is spoken in the clip.