im working on a linked list assignment....AGAIN (god i hate my teacher) anyway, he said we had to write these two new functions...
Code:
//function reverses phone book, cannot be altered
const PhoneBook* ReversePhoneBook(const PhoneBook *headP)
{
//take phone book, traverse through and reverse the order
}
//function combines 2 phone books.
void CombinePhoneBook(PhoneBook **headPP1, const PhoneBook *headP2)
{ //take phone book 2 and add it to phone book 1
//if anything matches, throw it out
}
the linked list im dealing with is a singlely linked, meaning there is only one pointer pointing to the next node, none pointing to the previous, can anyone help get me going on these functions, like usual im kinda confused where to start