官术网_书友最值得收藏!

Upsides

The main benefits of a linked list are the abilities to grow very large in size cheaply, always maintain a certain direction, and allow to access items individually. What makes this data structure unique?

There are a few points:

  • Low overhead allocation per item.
  • Item count is only limited by heap memory.
  • Mutation while iterating is possible.
  • A direction is strictly enforced—there is no going back.
  • Implementation is fairly simple (even in Rust).
  • Efficient append, prepend, delete, and insert operations—compared to an array (no shifting required).

Generally, the linked list performs well in an environment where limited memory does not allow overhead allocation (as dynamic arrays do), or as a basis for an exotic lock-free data structure.

主站蜘蛛池模板: 山阴县| 安康市| 灌阳县| 海宁市| 枣强县| 凤阳县| 江都市| 安多县| 蓬溪县| 城步| 大渡口区| 舒兰市| 长泰县| 平塘县| 汕头市| 时尚| 托克托县| 清丰县| 贡觉县| 祁东县| 六枝特区| 垦利县| 长子县| 东阳市| 中牟县| 巴林左旗| 万全县| 宁明县| 天水市| 孙吴县| 湖北省| 当阳市| 永泰县| 轮台县| 西安市| 南华县| 故城县| 乐安县| 叙永县| 天峨县| 巴彦淖尔市|