DNF sort from sorting

Here’s my code for DNF sort.

Here’s the question link
https://practice.geeksforgeeks.org/problems/sort-an-array-of-0s-1s-and-2s/0#

I am trying to submit it gives error but the logic is fully correct.

hello @div_yanshu07

use if - else if - else in place of 3 ifs