Sort an array of 0s, 1s and 2s || DSA Flipkart series-4 || GFG || CODE || Explanation

Опубликовано: 14 Октябрь 2024
на канале: coding sikho
34
1

Given an array of size N containing only 0s, 1s, and 2s; sort the array in ascending order.


Example 1:

Input:
N = 5
arr[]= {0 2 1 2 0}
Output:
0 0 1 2 2
Explanation:
0s 1s and 2s are segregated
into ascending order.

Question link:- https://www.geeksforgeeks.org/problem...


playlist link:-    • Announcement Data Structure and Algor...  


Follow Me On Social Media

Facebook:-   / mdsaifraza.raza.526  
LinkedIn:- linkedin.com/in/md-saif-raza-99941523a
Twitter:-   / mdsaifr10053951  
Instagram:-   / saif_raza8544