Consider the following struct for a doubly linked
list.
struct list_node
{
int m_value;
list_node* m_previous = nullptr;
list_node* m_next = nullptr;
};
Implement the function
list_node* reverse(list_node* head);
that reverses in-place the given list, without dynamic memory allocations, and returns a pointer to its new head.
You only need to submit the required classes; your main program will be ignored.
Strictly obey the type definitions of the statement.