'Coding has over 700 languages', '67% of programming jobs arenâ€™t in the
technology industry', 'Coding is behind almost everything that is powered
by electricity'

Topics

Given a singly linked list of * 'N'* nodes. Your task is to delete the middle node of this list and return the head of the modified list.

However, if the list has an even number of nodes, we delete the second middle node

```
If given linked list is 1->2->3->4 then it should be modified to 1->2->4.
```

Detailed explanation

```
5
1 2 3 4 5
```

```
1 2 4 5
```

```
We can clearly see that there are 5 nodes in the linked list therefore the middle node is the node with value '3'.
```

```
1
2
```

```
-1
```

```
We can clearly see that there is only one node in the linked list.
Therefore, after deleting that one node, the linked list becomes empty, resulting in an output of -1.
```

```
1 <= N <= 10^3
0 <= data <= 10^3
Where 'N' is the length of the linked list.
Time Limit: 1 sec
```