We are given a task and a struct of linked list:
typedef struct dlistint_s { int n; struct dlistint_s *prev; struct dlistint_s *next; } dlistint_
If you use a double pointer, you can pass in the address of the head so your functions can modify the actual pointer. This way you don't need to return the new head.