45.0k views
5 votes
Please discuss the differences between the array implementation and the linked list implementation of queues. List the advantages and disadvantages of each implementation.

User MGorgon
by
5.1k points

1 Answer

4 votes

Answer:

Arrays and linked list are data structures used to store data but it has some advantages and disadvantages.It Is important keep in mind thath both of them are completely usefull in it own case

Step-by-step explanation:

Advantages:

  • Linked list:
  1. It doesn't have a size limitation
  2. It is easy insert new elements
  3. it doesn't have memory limitation
  • Array:
  1. It is possible access random elements
  2. The memory requirements are less than linked list

Disadvantages:

  • Linked list:
  1. It is not possible access random element in the list
  2. it Require more memory to store the pointer to the next element
  • Array:
  1. It is expensive insert new elements
  2. it is fixed size
  3. it needs continuos memory (memory limitation)
User Dawoud
by
5.6k points