Java || Explained completely || Easy and Beats 100% || 0 ms
```\nclass Solution {\n    public ListNode[] splitListToParts(ListNode head, int k) {\n        \n        ListNode curr = head;\n        int length = 0;\n       
```\nclass Solution {\n    public ListNode[] splitListToParts(ListNode head, int k) {\n        \n        ListNode curr = head;\n        int length = 0;\n        // find the total length of the linked list \n        while(curr!=null)\n        {\n            curr = curr.next;\n            length++;\n        }\n          int rem =0;\n          \n        // if condition to handle edge cases\n          if(length>=k)\n          rem =  length %k;\n        \n        // find the length of subparts we need to divide it into \n         int cutLength =  length/k;\n        \n        // again starting from head \n        curr = head;\n        ListNode arr[] = new ListNode[k];\n        ListNode temp = curr;\n        int len =0;\n        // x to check when we reach k\n        int x =0;\n        while(curr!=null )\n        {\n            len = rem>0?cutLength + 1:cutLength;\n            // remember to decrement rem as we are using 1 from rem always for each subarray length \n            rem = rem-1;\n            // reach till the end \n            while(curr.next!= null && len-->1)\n            {\n                curr =  curr.next;\n             \n            }\n           \n              //System.out.print(curr.val + " ");\n            // save the new head\n            ListNode newHead =  curr.next;\n            curr.next = null;\n            // store the curr subarray to the result\n            arr[x] = temp;\n            // move to the next subarray \n            temp =  newHead;\n            curr = newHead;\n            x++;\n        }\n        \n        //System.out.print(length);\n        return arr;\n    }\n}
['Java']