[Difference] data structure arrays, linked lists, queues, stacks and contact

table of Contents


This article summarize arrays, linked lists, queues, stacks differences and connections.


In fact, these four data structures put together comparison is not very appropriate:

contact:

  • Four linear list data structure is a data structure.

the difference:

  • Arrays and linked lists are more biased towards the concept of data storage array in contiguous space to store data, high random read efficiency, but lower data Add Remove efficiency; and list data can be stored in non-contiguous space, random access low efficiency, high deleting data added efficiency.
  • Queue stack and data access is a conceptual description of the embodiment, a FIFO queue, and the stack is a LIFO; stacks and queues may be used to achieve an array or linked list.

Guess you like

Origin www.cnblogs.com/54chensongxia/p/11492311.html