please, explain your work
Problem 2 (30 points): Manipulating Linked Lists Prof. Lumetta needs your help! He has gathered his books into a linked list of book_t structures, defined as shown below. The next field links one book to the next in the list. typedef struct book_t book_t; struct book_t { char* title; char* author; char* call_number; int due_date; book_t* next; Prof. Lumetta needs to separate a linked list of books" (book_t's) into two separate lists based on their due dates (the due date field). Help Prof. Lumetta by completing the function on the following page. The function signature is as follows: book_t* collect_books (book_t** listp, int due_by); The function takes two parameters: listp a pointer to a pointer to the first book in the original linked list of books due_by-the date used to separate the list The function must separate the original list into two separate linked lists, each correctly terminated, as follows: All books with due date field less than or equal to due_by should be removed from the original list and collected into a new list. The order of these books in the new list does not matter. The function must return a pointer to the first book in the new list. Any book with a due date larger than due_by should remain in the original list. The order of these remaining books must not change. The function must update the value to which listp points to indicate the first book in the original list with a due_date larger than due_by. Problem 2, continued: A structure definition replicated for your convenience / typedef struct book_t book_t; struct bookt char* title; char* author; char* call number; int due_date; book to next; * Complete the function by filling in the blanks. */ book_t* collect_books (book_t** listp, int due_by) book_t* collected; book_t* book; while book -*listpi if (due_by listp - } else { "listp collected