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

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.

主站蜘蛛池模板: 武宣县| 深水埗区| 监利县| 缙云县| 张家界市| 钟山县| 江永县| 丽水市| 嘉义市| 湖口县| 阳原县| 泾源县| 兴业县| 台湾省| 枣庄市| 太仆寺旗| 秀山| 夹江县| 海阳市| 汉寿县| 毕节市| 临海市| 抚顺市| 平山县| 通城县| 新源县| 邵武市| 南溪县| 吉水县| 湖北省| 青海省| 额尔古纳市| 宜兰市| 新竹市| 鸡泽县| 当雄县| 临猗县| 榆树市| 通渭县| 泸州市| 蓬安县|