less than 1 minute read

Given a singly linked list of integers node, sort the nodes by their values in ascending order.

Constraints

  • n ≤ 100,000 where n is the number of nodes in node

https://binarysearch.com/problems/Sort-a-Linked-List

Examples

Example 1

Input

  • node =

Output

  • answer =

Solution

Leave a comment