coding practice - solving Sierpinski Triangle Problem