3 ms·
I love this algorithm -- it's so elegant and succinct. Slightly off-topic, but one of the algorithms I'm most proud of coming up with as an engineer was an off
by lpolovets 7y ago
I love this algorithm -- it's so elegant and succinct.
Slightly off-topic, but one of the algorithms I'm most proud of coming up with as an engineer was an offshoot of Levenshtein distance where I had to find all pairs of strings in a set of ~1m strings which were fairly similar. 1m x 1m x O(n^2) is very slow. There turned out be a good way to figure out a lower bound on distances using some precomputation, and that eliminated almost all of the pairwise O(n^2) Levenshtein computations.
I'm anyone's interested, here the description: https://www.quora.com/What-is-the-best-programming-algorithm-that-you-have-ever-created/answer/Leo-Polovets https://www.quora.com/What-is-the-best-programming-algorithm...
- tomglynch 7y agoYour sample use case in your 'At Google' response is eery. > "At Google, say we had 1 million plaintext passwords..."
- lpolovets 7y agoThat wasn't the actual use case and we didn't store passwords in plaintext. But I didn't want to give away the actual use case. In hindsight, passwords are definitely a bad fake example.