Sort an array of 0s, 1s, 2s and 3s
Given an array arr[] of size N consisting of 0, 1, 2, and 3 only, the task is to sort the given array in ascending order. Example: Input: arr[] = {0, 3, 1, 2, 0, 3, 1, 2}Output: 0 0 1 1 2 2 3 3 Input: arr[] = {0, 1, 3, 1, 0, 1, 3, 2, 1, 2, 0, 3, 0, 0, 1}Output: 0 0 0 0 0 1 1 1 1 1 2 2 3 3 3 Naive Ap