Frage im Vorstellungsgespräch bei Apple

How will you implement sets and the intersection operation? Complexity?

Antworten zu Vorstellungsgespräch

Anonym

19. Sept. 2011

I suggested to implement sets using self-balanced binary trees, although I can be done (dunno if in a more efficient way) with hashmaps.

Anonym

2. Dez. 2018

self-balanced binary trees is not a good choice as you're assuming the content of the set are comparable.