For each set of bits, American flag sort makes two passes through the array of objects: first to count the number of objects that will fall in each bin, and second to place each object in its bucket.
Za svaki skup bitova, american flag ima dva prolaza kroz niz objekata: prvo da prebroji broj objekata koji će pasti u svaku kantu, a drugi da smesti svaki objekat u njegovu kantu.