Re:Parsing time stamps faster with SIMD instructions
by reaperman on Sunday July 02, 2023 @01:41PM
(#36563659)
Kind of a weird leaderboard if you can’t even check to see if answers satisfy correctness. I’ve seen plenty of leaderboards where the top answers would fail cases that weren’t covered by the leaderboards testing.
[ Parent
| on HN ]
Re:Parsing time stamps faster with SIMD instructions
by paulmd on Sunday July 02, 2023 @02:32PM
(#36564264)
Yeah, most of the leetcode top solutions are a hardcoded table of answers for the scoring questions followed by the general solution.
Re:Parsing time stamps faster with SIMD instructions
by anonymoushn on Sunday July 02, 2023 @06:09PM
(#36566313)
I think it's not such a big deal because the input generators are usually pretty good and because most solutions that give up some correctness for performance can pretty cheaply detect that they done goofed and fall back to a slow path where they start over and do it some other way. This ends up being useful because scoring is the median runtime of 3 successful runs (so if you fail one of the 3 then your submission fails completely). It also means that probabilistic solutions that would be correct in non-adversarial environments (like using a bloom filter or N bloom filters tuned to give an exact result given the input constraints with probability >99.9%) are admissible.
Re:Parsing time stamps faster with SIMD instructions
by o_bender on Tuesday July 04, 2023 @04:52PM
(#36592375)
This particular solution does satisfy correctness, although I can't share the source code (as the competition is ongoing). Feel free to provide your input data and I'll run it to compare with your expected result.