Workfall interview question

Pattern programming for the diamond shape