#leetcode #sorting #coding
1. This problem clears the understanding that if we have some specific numbers given in an array we can use counting sort.
2. Another approach is a 3 pointer approach that is explained in the video.
3. 3 pointer approach requires 3 pointers :P
Start: Will always point to the position where we need to insert the next 0
End : Points to the position where we need to insert the next 2
Index: That keeps checking the numbers in the array.
3 cases:
num[index]==2
num[index]==0
num[index]==1
We handle these 3 cases seperately !