Skip to content

Latest commit

 

History

History
18 lines (13 loc) · 888 Bytes

interview-data-structure.md

File metadata and controls

18 lines (13 loc) · 888 Bytes

数据结构

1.什么是跳跃表?

跳跃表是基于有序链表的一种扩展

查看资料

2. 介绍下 RESTFull API 方式下, 怎么做到快速路由?

一般使用前缀树/字典树, 来提高查找速度.

开源的路由模块里, httprouter 是比较快的, 参考: https://github.com/julienschmidt/httprouter
他使用了一种改进版的前缀树算法. 这个树的应用非常广泛, 除了做路由, 还有 linux 内核里使用, 在数据库里也有用到.
参考文章:

  1. 路由查找之Radix Tree
  2. 图文详解Radix树
    3.radix tree在数据库PostgreSQL中的一些应用举例