A curious case of O(N^2) behavior which should be O(N) (2023) | Dark Hacker News