#### Reversing a Singly Linked List in Place

This problem asks you to write a function to reverse a singly linked list in place. The input is a singly linked list, and the output should be the same list, but reversed .

#### Problem

```Given a singly linked list, write a function to reverse the linked list in place.
Input: 1 -> 2 -> 3 -> 4 -> 5
Output: 5 -> 4 -> 3 -> 2 -> 1```

#### Solution

This solution is in JavaScript. Our A.I. can create solutions in multiple languages.
```// Solution:
// The optimal solution is to use a while loop to iterate through the linked list.
// The while loop will continue until the current node is null.
// The while loop will set the current node's next to the previous node.
// The while loop will then set the previous node to the current node.
// The while loop will then set the current node to the next node.
// The while loop will then set the next node to the current node's next.
// The while loop will then set the head to the previous node.

let previous = null;
let next = null;

while (current !== null) {
next = current.next;
current.next = previous;
previous = current;
current = next;
}