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

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.

主站蜘蛛池模板: 温泉县| 涿州市| 仁寿县| 都昌县| 睢宁县| 罗定市| 洞头县| 吐鲁番市| 定边县| 汝南县| 喀喇| 永泰县| 新营市| 徐闻县| 镇赉县| 彝良县| 扎赉特旗| 平定县| 华容县| 兴文县| 冕宁县| 乌鲁木齐县| 冕宁县| 蛟河市| 乐陵市| 离岛区| 台北县| 双城市| 中江县| 迭部县| 彩票| 曲阳县| 城市| 榆社县| 衡阳县| 那曲县| 渝中区| 石景山区| 大洼县| 太谷县| 承德市|