699. Sort Linked List
Given a linked list with n nodes, the task is to sort the linked list using the insertion sort algorithm.
The input consists of two lines. The first line contains an integer n, representing the number of nodes in the linked list. The second line contains n space-separated integers, representing the node values of the linked list.
Print the linked list after sorting it using the insertion sort algorithm.
5 2 3 4 1 5
1 2 3 4 5
n must be less than 30