Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and the Yahoo Answers website is now in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

Difference between Linked Lists and Queus in C?

What is the difference and when should they be used?

1 Answer

Relevance
  • MeMeMe
    Lv 7
    8 years ago

    A queue is an abstract data type where you remove elements in the same order that you added them (first in, first out). A linked list is a data type where you can randomly add and remove elements. You can also traverse a linked list freely in the direction of the link whereas a queue doesn't allow you to access any element other than the one standing in the front.

    Queues can be implemented using linked lists, they can also be implemented using an array and a read and write pointer.

Still have questions? Get your answers by asking now.