Given an array containing only 0, 1, and 2, sort it in place so equal values are adjacent and ordered 0, then 1, then 2.
Return the sorted array. Do not use a built-in sorting function.
Inputnums = [2, 0, 2, 1, 1, 0]
Output[0, 0, 1, 1, 2, 2]
Inputnums = [2, 0, 1]
Output[0, 1, 2]
1 ≤ nums.length ≤ 300