Comment

Comment by xen0

Describing 'throwing a hashmap' at the problem as 'premature optimisation' is a bit reductionist.

It wouldn't even occur to me to go with the naive O(n^2) solution because it has such obvious drawbacks with large inputs.

And it's an interview question... yes, you're getting a No-Hire if you just leave it there. Although I personally would prompt you if you're not interviewing for a senior position.

parent xen0 3 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton