Hacker News new | ask | show | jobs
by dooglius 334 days ago
Why would iterating over the dense vector be O(m) rather than O(n)?
1 comments

Sorry, I meant iterating over the sparse vector, not the dense vector (I find the nomenclature in the article somehow inverted).
You could do intersection by iterating over the dense vector though, not sure why you would need to iterate over the sparse one
Yeah, sure, you can iterate over the dense vector and check in the other side's sparse vector, that's correct.