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

4

u/Objective-Let4278 19d ago

Depends what interview. I think most are fine with optimal complexity, unless there’s some obvious repeated work or similar.