Hacker News new | ask | show | jobs
by kd5bjo 1412 days ago
The LeetCode version doesn't require linear time, and caps the number of elements to 10^5, so the brute-force O(n^2) time solution seems perfectly acceptable.
1 comments

Tried it with a simple loop, got time limit exceeded unfortunately.