Instead of looking at N stacks N times,  he’ll look at N stacks just 3 times— which is what’s called linear time.
Ao invés de verificar "n" colunas "n" vezes, irá verificar "n" colunas apenas três vezes, ao que chamamos "tempo linear".