5 ms·
The three solutions (n^2 time 1 space, n lg n time k space and n time n space) are basically the three strategies to perform a join in a relational database: a
by qsort 3y ago
The three solutions (n^2 time 1 space, n lg n time k space and n time n space) are basically the three strategies to perform a join in a relational database: a full table scan, a merge-join and a hash-join respectively.
"explain select" is a cool source of interview questions :)
- dopidopHN 3y agoThanks. My reasoning was indeed “alright, it’s a weird world without DB, what a DB do? Hash-join.
- deleted 3y ago[deleted]
- AstralStorm 3y agoA better db would keep an online running window in a bloom filter for it, though. (A good implementation of an index.) Not even mentioned in the post.
- deleted 3y ago[deleted]