

1. If the list is empty, the function immediately returns None because there is no middle node to find.
2. If the list has only one node, then the only node in the list is trivially the middle node, and the function returns that node.
The first line contains an integer 'N', the size of the linked list.
The second line contains 'N' space-separated integers.
The output contains all the integers from the middle node.
You do not need to print anything, it has already been taken care of. Just implement the given function.
We can take the Following Approach:
Keeping all that in mind we can use the following strategy to find the middle element.