logoalt Hacker News

krackerstoday at 4:47 AM0 repliesview on HN

>"it's a data stream" I knew the answer was going to be reservoir sampling.

But it's only an approximate percentile. Unless the interviewer mentions that an approximate solution is OK, you would be stuck. (And it's not fair to ask the candidate to ask whether an approximate solution is ok given that almost every problem has an easy "approximate" solution which is not explicitly not what they're looking for).