def sort_012(input_list):
    """
    Given an input array consisting on only 0, 1, and 2, sort the array in a single traversal.

    Args:
       input_list(list): List to be sorted
    """
    pivot = 1
    i, j, k = 0, 0, len(input_list) - 1
    # print("Start ", input_list)
    while j <= k:
        if input_list[j] < pivot:
            if i != j:
                input_list[i], input_list[j] = input_list[j], input_list[i]  # swap i and j
                i += 1
            else:
                j += 1
        elif input_list[j] > pivot:
            input_list[j], input_list[k] = input_list[k], input_list[j]  # swap j and k
            k -= 1
        else:
            j += 1
    return input_list