Goldman Sachs Interview Question

Print the required pattern