Cognizant Interview Question

Java - Logic to print Inverted Pyramid