Java Easy Solution
\nclass Solution {\n    public ListNode insertionSortList(ListNode head) {\n        \n        ListNode temp = head;\n        int n=0;\n        while(temp!=null)
\nclass Solution {\n    public ListNode insertionSortList(ListNode head) {\n        \n        ListNode temp = head;\n        int n=0;\n        while(temp!=null)\n        {\n            n++;\n            temp=temp.next;\n        }\n        temp=head;\n        \n        int arr[] = new int[n];\n        int i=0;\n        while(temp!=null)\n        {\n            arr[i]=temp.val;\n            i++;\n            temp=temp.next;\n        }\n        \n        for(i=1;i<n;i++)\n        {\n            for(int j=i;j>0;j--)\n            {\n                if(arr[j-1]>arr[j])\n                {\n                    int a=arr[j];\n                    arr[j]=arr[j-1];\n                    arr[j-1]=a;\n                }\n                else\n                {\n                    break;\n                }\n            }\n        }\n     \n        temp=head;\n        i=0;\n        while(temp!=null)\n        {\n            temp.val =arr[i];\n            i++;\n            temp=temp.next;\n        }\n        \n        return head;\n    }\n}
['Array', 'Java']