Bitwise interview question

Write program for Star pattern algorithms