The problem was about vertex welding. Some books, like Real-Time Rendering, only mention the N log N solution.
I was annoyed after the interview and thought, which book would I have had to read to get this question right? The only 2 books I could find that had the optimal answer were the 1st edition of this math book and Real-Time Collision Detection.
I suppose if I was smarter I could have figured out the "bucket" trick. I find interviews too stressful to think clearly.