write an algorithm that takes an array and moves all of the zeros to the end preserving the order of the other elements movezerosfalse 1 0 1 2 0 1 3 a returns false 1 1 2 1 3 a 0 0 the time complexity of the below algorithm is on false 0 is true false 0 is true not using not i to avoid false etc
def move_zeros(array):
    result = []
    zeros = 0

    for i in array:
            if i == 0 and type(i) != bool:  
                zeros += 1
            else:
                result.append(i)
    
    result.extend([0] * zeros)
    return result


print(move_zeros([False, 1, 0, 1, 2, 0, 1, 3, "a"]))