79823429

Date: 2025-11-18 13:52:58
Score: 2
Natty:
Report link

Thanks, the times I mentioned were the submission results from leetcode, so I can't be sure as to what the input sizes were, although its to be noted that with a large input size in one of the testcases, the O(n) time solution struggled to complete in the required time, unless you loop through the set instead of the input array, and my O(nlogn) (presumably) time solution didn't struggle with it at all.
I'm quite new to this so I'm trying to figure out any rules to keep in mind when estimating the performance of my programs.

Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Long answer (-0.5):
  • No code block (0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Leopold