Best C++ Code (Beats 80%)
Intuition\n Describe your first thoughts on how to solve this problem. \nplzz upvote\n# Approach\n Describe your approach to solving the problem. \nplzz upvote\
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\nplzz upvote\n# Approach\n<!-- Describe your approach to solving the problem. -->\nplzz upvote\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\nplzz upvote\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\nplzz upvote\n# Code\n```cpp []\n\nclass Solution {\npublic:\n    ListNode* sortedInsert(ListNode* head, ListNode* node) {\n        if (head == nullptr || head->val >= node->val) {\n            node->next = head;\n            return node;\n        }\n        ListNode* current = head;\n        while (current->next != nullptr && current->next->val < node->val) {\n            current = current->next;\n        }\n        node->next = current->next;\n        current->next = node;\n        return head;\n    }\n    ListNode* insertionSortList(ListNode* head) {\n        ListNode* sorted = nullptr; \n        ListNode* current = head;\n        while (current != nullptr) {\n            ListNode* next = current->next; \n            sorted = sortedInsert(sorted, current);\n            current = next; \n        }\n       return sorted;\n    }\n};\n\n```     Thank U for Your Kind Attention
['C++']