Acabes International interview question

To write a code for a certain pattern