easy solution
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    vector<ListNode*> splitListToParts(ListNode* head, int k) {\n        int cnt = 0;\n        ListNode* temp = head;\n        \n        // Calculate the total number of nodes\n        while (temp != nullptr) {\n            temp = temp->next;\n            cnt++;\n        }\n        \n        // Reset temp pointer to the beginning\n        temp = head;\n        \n        vector<ListNode*> ans;\n        \n        int parts = k;\n        int nodesPerPart = cnt / k;\n        int extraNodes = cnt % k;\n        \n        for (int i = 0; i < k; i++) {\n            ans.push_back(temp);  // Start of a new part\n            \n            int nodesInThisPart = nodesPerPart + (i < extraNodes ? 1 : 0);\n            for (int j = 0; j < nodesInThisPart - 1; j++) {\n                temp = temp->next;\n            }\n            \n            if (temp != nullptr) {\n                ListNode* nextNode = temp->next;\n                temp->next = nullptr;  // End the current part\n                temp = nextNode;  // Move to the next part\n            }\n        }\n        \n        return ans;\n    }\n};\n\n```
['C', 'C++']