New update is available. Click here to update.

Topics

For a given Singly Linked List of integers, sort the list using the 'Merge Sort' algorithm.

Detailed explanation

```
1 <= N <= 10^5
1 <= DATA <= 10^9
Where 'DATA' denotes the value of node of Linked List.
Time Limit: 1sec
```

```
1 4 5 2 -1
```

```
1 2 4 5
```

```
10 9 8 7 6 5 4 -1
```

```
4 5 6 7 8 9 10
```