NeetCode #336LC-147MediumLinked List
← Back to All Problems#336 · #147 · Insertion Sort List(对链表进行插入排序)
📌 Problem Statement & Constraints
Given the head of a singly linked list, sort it using insertion sort and return the head. The steps of the insertion sort must be represented by relinking the nodes. Constraints:
1 <= n <= 5000, -5000 <= Node.val <= 5000.🔒
Sign In to Unlock Full Solutions for All 973 Problems
Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!