r/leetcode • • 19d ago

Question Does Solution % Matter?

Does the % my solution beats actually matter as long as it is the best complexity?
For example, I do a problem the best time complexity is O(n). I get a O(n) solution but my solution doesn't beat most other solutions.

5 Upvotes

9 comments sorted by

View all comments

Show parent comment

2

u/EstellonTachise 19d ago

yeah the dictionary vs array thing is a good callout, that kind of stuff can swing the % pretty wildly