answersLogoWhite

0


Best Answer

from the abstraction: list

you go to the implementation details (concrete):

arraylist,vector or linkedlist,circularlinkedlist and maybe more

when somebody asks you for a special list in this case (queue)

speciality 1 enqueue -add to botton

speciality 2 dequeue - remove from top

you are free to pick up arraylist,and/or linkedlist and/or circularlists and/or vector to implement your new specialized list called queue.

and/or means you might want to combine as well

User Avatar

Wiki User

13y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

10y ago

A linked list does not require a complete reallocation in order to accommodate more elements than the current allocation permits. In addition, a linked list does not require elements to be shunted forward in the queue with each extraction. Although a linked list uses more memory than an array (one additional pointer variable per node), it is a more efficient structure than an array. An array is only useful when you need constant time random access to any element, but queues only require constant time access to the last element, and constant time access to the head element for extractions. Thus a singly-linked list is the most efficient structure, which can be improved slightly simply by making the list circular, such that the tail node points to the head node. Insertions then occur between the tail and the head node (the new node then becomes the tail node), while extractions always occur at the head (the head node's next node becomes the new head).

This answer is:
User Avatar

User Avatar

Wiki User

13y ago

Array and Queue are both used in relation to order and arrangement. They are used as nouns as well as verbs and both have broad and specific uses.

A broad definition of Queue is a line and is often used to specifically identify a line of people or vehicles. Queue is also used as a technical term in Computer Science; it is a sequence of stored data awaiting processing. As a noun, queue has another definition seemingly irrelevant to its broad definition; Queue is a braid of hair worn hanging down the back of the neck. The knots in a braid may be thought of as knots on a line, and thus this definition is not irrelevant after all. As a verb, Queue simply means to line up.

A broad definition of Array is an orderly arrangement. Array denotes several ideas and thus has many specific uses. Array is often thought of as a large and impressive organization of things, giving it an an aura of imposing nature. This aura of imposing nature associates Array with the the imposing and impressive arrangement of military troops drawn up for battle, as it is often thought of as well. As a Computer Science term, Array is an arrangement of a series of terms according to value or some geometric pattern.

Since the broad definition of Queue falls under the broad definition of Array, it is valid to use them synonymously, however to a limited extent because sentences cannot be ambiguous, or sentences must make sense. These words exist for this purpose, as language tools for the precision and clarity to make the most sense out of a sentence.

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

It depends on your need. But I personally recommend linked list because of the dynamic memory allocation. In array we declare the memory size while writing the program but in linked list we use only that amount of memory which is needed

Some people prefer arrays because of the complex programs of linked lists.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What are the Differences between array and queue?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Queue ADT Using Array?

implement the queue ADT using an array


What is the difference between queues and circular queues?

A queue can use a dynamic array, or a linked list, but if using static memory, the queue becomes a circular queue because the underlaying data structure is a static circular array. This means the ends of the array are attached.


Which queue most efficient queue using array?

circular queue


Array implementation of priority queue?

the priority queue is which depends on the data stored.in which their priority is maintained by checking the forth coming values stored in the queue


What is single dimension in data structure?

Array, Stake, Queue.


Write down the function to insert an element into a queue, in which the queue is implemented as an array?

bring the police they will be in que by themselves


Algorithm to implement Multiple queue in single dimensional array?

algorithm on multiple queues in a single dimensional array


How do you implement a FIFO structure?

FIFO is a first-in, first out structure. In other words, it is a queue. The most efficient way to implement a queue is with a circular array.


Array implementation of priority queue example program in c plus plus?

yes


What are the differences between broadside array and endfire array?

in received antenna: broadside means the direction of arrival is 90 degree or wave perpendicularly impinges the array. and endfire means the wave comes from the direction along the array axis.


Data structure algorithms using C?

array,linklist,queue,stack,tree,graph etc...


Is there any overhead issues if you make a 2D array arr28 rather than making a 1D array arr16 of size 16 Any memory issues or execution differences between the two?

2D array of size 2x8 and 1D array of size 16