Week 5 Objectives


At the end of this week's classes you should

KNOW:

BE ABLE TO:

Sample Quiz Questions:

  1. Implement the following function:
        int everyNodeIsx (struct listNode* head, int x);
        /* Precondition: head is the head pointer of a 
        ** non-empty linked list.
        ** Postcondition: The return value is 1 (true) if every node in the
        ** list contains x in the data part. Otherwise, the return value
        ** is 0 (false).
        */
    
  2. Explain why the dequeue operation works differently for a queue containing one item as opposed to a queue containing more than one item.