← 返回刚才阅读的位置

知识卡片

问题卡 · 4446

短码长度由编码空间决定

理解等级:高级

若短码允许 62 种字符,长度 n 可表示 62 的 n 次方个组合;应选满足目标记录数的最小长度。十年每日一亿条是 3650 亿条,七位空间约 3.52 万亿;原文估算段落的年数与存储算式存在笔误,不能照抄。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • 短链 · 查看原书依据

      Hash value length The hashValue consists of characters from [0-9, a-z, A-Z], containing 10 + 26 + 26 = 62 possible characters. To figure out the length of hashValue, find the smallest n such that 62^n ≥ 365 billion. The system must support up to 365 billion URLs based on the back of the envelope estimation. Table 8-1 shows the length of hashValue and the

    参考来源

    - 位置:《System Design Interview – An insiders guide, Second Edition》第08章《短链》(来源项目 book-sources;源文件:extracted/System Design Interview – An insiders guide, Second Edition/_epub-src/text/part0021_split_003.html) - 结论依据:原文在该位置给出所述对象、机制或比较,支持本卡的解释;原书未展开的实现不作为已证明结论,算式与一致性边界在正文明确限定。 - 原始内容:Hash value length The hashValue consists of characters from [0-9, a-z, A-Z], containing 10 + 26 + 26 = 62 possible characters. To figure out the length of hashValue, find the smallest n such that 62^n ≥ 365 billion. The system must support up to 365 billion URLs based on the back of the envelope estimation. Table 8-1 shows the length of hashValue and the