Tap here to switch tabs
Problem
Submissions

Problem: Insertion Sort List

med
30 min
Try to solve the Insertion Sort List problem.

Statement

Given the head of a singly linked list, sort the list using insertion sort and return the head of the sorted list.

Constraints:

  • The number of nodes in the list is in the range [1,5000][1, 5000].

  • −5000≤-5000 \leq Node.val ≤5000\leq 5000

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Insertion Sort List

med
30 min
Try to solve the Insertion Sort List problem.

Statement

Given the head of a singly linked list, sort the list using insertion sort and return the head of the sorted list.

Constraints:

  • The number of nodes in the list is in the range [1,5000][1, 5000].

  • −5000≤-5000 \leq Node.val ≤5000\leq 5000