4 ms·
I came up with a variant of this idea in an interview once. It did not go over too well. :)
by pmiller2 10y ago
I came up with a variant of this idea in an interview once. It did not go over too well. :)
- asimpletune 10y agoWhat was the feedback the gave you?
- proksoup 10y agoI was asking for a function that converted a number (auto incremented id) to a string, such that all possible shortest urls would be iterated through. E.g. given character set a-z, 0: a 1: b 26: aa 27: ab etc. I probably had no idea what the interviewee was suggesting and tried and failed to explain my question any better.
- pmiller2 10y agoHe just said "Yeah, ok, that could work, now do it with a database." :P
- 19eightyfour 10y agoIf you come up with some ideas how to improve the compression, please do submit an issue or PR! Thanks for commenting!