Write a class method ahowOdd that would traverse a linked list of this type. This method would output only the odd numbers in this linked list. Also, assume that you have two links lists of such nodes that are in increasing order. Write a method that will accept pointers to two linked lists of this type. The method should return a pointer to a linked list consisting of the two linked list combined but in reverse order. if the Lists started with p and q pointing to them, the returned list would be pointed to by s. it is OK to destroy the two original lists during the method.

Leave a Reply

Your email address will not be published. Required fields are marked *