Amol Technologies interview question

Write a code to print diamond pattern