TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: How can Google Maps built in URL shortener be so short?

5 点作者 DarkMeld超过 13 年前
It looks like it only uses 4 unique characters. (ex. http://g.co/maps/32xe)

3 条评论

chetan51超过 13 年前
It might be incrementally generating codes. So it's only at 4 unique characters because only those many URLs have been generated so far; once all the 4-character codes have been exhausted, it would start using 5-character codes.
mariust超过 13 年前
Or maybe a link expires in a certain amount of time (2-4 months for e.g.) and they start from the start there are quite a few combinations translated in math is something like combinations of 10 (digits) by 28 (letters)
jones1618超过 13 年前
I agree with chetan51. There are 36 ^ 4 = 1,679,616 possible four-character short links. I imagine these are permanent. When they run out, they'll go to 5 for the next 60 million, etc.
评论 #2940673 未加载