gansteed
V2EX  ›  问与答

数据结构在实际项目中的使用(三):字典

  •  
  •   gansteed · Oct 14, 2019 · 1460 views
    This topic created in 2402 days ago, the information mentioned may be changed or developed.

    字典是常用的一种数据结构,在有的语言里叫做 dict,有的语言里叫做 map。字典一般用来实现 KV 存储,也就是说,给定一个 Key, 能够快速的把 Value 找出来。实现字典的方式一般有两种:

    • 使用树
    • 使用哈希表

    在这篇文章中我们将介绍字典这种数据结构,我们从字典的两种实现方式入手,分别简要的介绍如何使用树和哈希表来实现字典,最后我们列举一些常见的字典的使用场景。

    原文在: https://jiajunhuang.com/tutorial/data_structure/dict.md

    这个系列的文章在: https://jiajunhuang.com/tutorial/data_structure/index.md

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   4868 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 10:04 · PVG 18:04 · LAX 03:04 · JFK 06:04
    ♥ Do have faith in what you're doing.