Sort through this array once using one loop
Given an array containing only 0, 1, and 2, sort it in ascending order in place. Use exactly one loop and constant extra space.
Function: def sort_colors(nums):
The function should modify nums directly and return the sorted array.
def sort_colors(nums):