Fast and Golfiest Robbers Thread
Welcome to the first season of Fast and Golfiest, a cops-and-robbers challenge! I designed this challenge to encourage competitive coding for efficiency (fastest algorithm) to become more popular on the site.
The rules are simple. The cops choose problems from LeetCode, a competitive coding platform, and solve them with code as efficient and short as possible. Now you, as the robber, will try to golf up their code, without sacrificing code efficiency. That is, the time complexity of your code must be smaller or equal to the cop code's complexity. You must also use the same language as the cop. Here's the link to the Cops Thread. Note that for the robbers, golfiness matters most! However, if your time complexity is lower than the cop code and shorter than theirs, your score will be 2.718 times the original!
Your answer post should include the following:
A link to the cop post you cracked.
Your code, its length in bytes.
The UTC time of your post.
The time complexity of your code (must be smaller or equal to the cop code's complexity).
You should also edit the cop post to say "Cracked" and add a link to your post.
Your score is the percentage reduction of the code length in bytes compared to the cop code (with the 2.718 times efficiency bonus if you got it), rounded to the nearest integer! Edit: Sorry, it seems unbalanced now so I have to nerf the robbers. The robbers' score will be divided by 4.
If you have any advices please let me know in the comments so that this challenge series could be improved. Thanks in advance!
Leaderboard (Periodically updated. Please note that I rank individual answers instead of answerers to encourage quality over quantity.):
- 9 points: ATOI String to Integer by The Thonnu
- 5 points: Concatenated Words by CursorCoercer
- 4 Points: Longest Substring Without Repeating Characters by CursorCoercer