KAAR Interview Question

Diamond Pattern, code in preferred in language