Sequence list VS linked list

Sequence list VS linked list

1. Time complexity

Insert picture description here

  • Advantages of the sequence table : It can be seen from the table that the sequence table is more suitable for scenarios where there are many read operations and few write operations;
  • The advantage of the linked list is that it can perform insertion and deletion operations flexibly. If you need to frequently insert or delete elements at the tail, it is more appropriate to use a linked list.

Guess you like

Origin blog.csdn.net/qq_45665172/article/details/112724811
Recommended