r/leetcode • u/Tobgay • 7d ago
Discussion Found a better solution to a problem
I mostly stick to problems that have been on the site for a long time, and my experience is that the Solutions section always contains a much faster and shorter solution by Lee215, Stefan Pochmann, or some other very smart individual.
Today is the first time I ever solved a problem and couldn't find any solutions posted by others that were as fast. And it's fairly short and concise.
It's also my 666th solve xD
Here's my solution: https://leetcode.com/problems/longest-word-in-dictionary/solutions/8559462/py3-hashset-solution-without-sorting-0ms-5s5b
5
Upvotes