TRAINING CATEGORIES
TRAINING PROGRAMS
Difficulty Level: EASY
Problem Statement:
Given a linked list of 0s, 1s and 2s. The task is to sort and print it.
Input:
Linked List before sorting 1 2 2 1 2 1 1 0 0
Linked List before sorting
1 2 2 1 2 1 1 0 0
Output:
Linked List after sorting 0 0 1 1 1 1 2 2 2
Linked List after sorting
0 0 1 1 1 1 2 2 2
We use cookies to make interactions with our websites and services easy and meaningful. Please read our Privacy Policy for more details.