Question: How can you implement a queue with a list?
Instructor answer: Keep the rear of the queue pointing to the tail of the linked list, so the enqueue operation is done at the end of the list, and keep the front of the queue pointing to the head of the linked list, so the dequeue operation is done at the beginning of the list.

Student answer: A list can have unlimited elements in it.  You can push a node onto the end of the list and pop the one in the front.
Score (0-5): 5

Student answer: theoretically you could do it two ways one of which uses more processing power and memory no larger than the queue is ever at when full and the other which uses almost infinite memory. The more practical method would be two place the items in an array and remove the item in position one of the array after which you can shift the array and add another element if required. The other option which can use infinite memory when used for long term queues such as job scheduling that goes nonstop for extended periods. that is to implement an array and add the items read item one raise your counter value to two ecetera and continue adding more elements to the array. the downside to this method is after you use element one it is still in memory. or im crazy who knows
Score (0-5): 2

Student answer: By implementing a list in which a tail pointer points to the item most recently inserted onto the back of the list and a head pointer which points to the item least recently inserted onto the list. Also, items can only be removed from the front of the list and can only be added to the back of the list.
Score (0-5): 5

Student answer: You can use list to represent the items in a queue.
Score (0-5): 1.5

Student answer: Have a pointer to the last element in the list and then use enqueue to insert items there. Link the first and last elements together to dequeue the list.
Score (0-5): 3.5

Student answer: Enqueue to the end of the linked list... dequeue items from the beginning (head) of the list.
Score (0-5): 5

Student answer: you use the first element in the list as the remove point for the queue and insert items at the end of the list.
Score (0-5): 5

Student answer: Utilizing a front pointer and a back pointer.  The front poiner and back pointer points to the first item into the queue.  As you add items, the front remains the same but the back poiner 'next' points to the new item and the new item is assigned to become the 'new' back pointer.
Score (0-5): 4.5

Student answer: Implement a linked list that only allows nodes to be added to the tail and can only be retrieved from the head.
Score (0-5): 4.5

Student answer: Check if list is empty and add elements to the list.
Score (0-5): 2.5

Student answer: make a linked list and add on to the front and delete from the back, keep track of both to do so.
Score (0-5): 4.5

Student answer: by making the head of the list the beginning of the queue and the last listed item the insertion point of the queue
Score (0-5): 4.5

Student answer: throw in data at the head and take it out at the tail
Score (0-5): 4.5

Student answer: You create a list of nodes that had a head and a top pointer, and the functions are basically the same substituting pop and push with enqueue and dequeue
Score (0-5): 3

Student answer: fairly easy... singly linked list with a pointer to the head and tail of hte list.<br><br>deque first item in que, create temp pointer to next element, delete head, and then make head the temporary pointer.<br><br>enque new item, use pointer to end of list, add a new item to the next item of the tail, and make the tail the next item of the current tail.
Score (0-5): 4.5

Student answer: Use a linked list with 2 pointers, one to the front and one to the back. As long as back != front, the queue is not empty.
Score (0-5): 4.5

Student answer: create a node with the input data, continue to add to the list.  when dequeueing - get the first elements data and set the next element in the list as the new first element
Score (0-5): 4

Student answer: A linked list with Stack principles. The Queue's top element is the element that is always being removed first. Must use nodes to contain each element, with a pointer to the top element, which also could  be called the head pointer.
Score (0-5): 3

Student answer: linked list checking for front and rear.  Keep enqueueing elements until front equal to rear -1.
Score (0-5): 3.5

Student answer: a queue can be implemented in a list by keeping track of two pointers, a head and a tail
Score (0-5): 4.5

Student answer: each element of a queue can be allocated in the nodes of an linked list. New elements should be added to the head of the list, with each dequeued element coming off the tail.
Score (0-5): 5

Student answer: Implement the operation dequeue() as the list operation remove(1) and the operation getFront(queueFront) as the list operation retrieve(1, queueFront)
Score (0-5): 4

Student answer: remove the first element and reference the second element as the new head of the list.
Score (0-5): 3.5

Student answer: By creating and adding nodes at the end of the list and removing the nodes from the beginning of the list.
Score (0-5): 5

Student answer: you would have your list and add a back pointer so that your program knows where the end is
Score (0-5): 4

Student answer: your queue storage class has a list, and for enqueue, you add the item to the end of the list, and for dequeue you return the first item in the list
Score (0-5): 4.5

Student answer: temp-&gt;next= NULL;<br>      if (front)  { (rear) -&gt; next= temp;}<br>      else front = temp;<br>      rear = temp;   }<br>
Score (0-5): 3.5