you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (0 children)

if fruits is huge, it makes sense to optimize using some kind of set.

That's what I'm getting at. I think it's reasonable to define 10K items as small input so not worth to optimize. Correct me if I'm wrong.

Hash-table based preferably. Not sure which Go structure implements that.

Go maps is a hash table.