Capgemini Engineering Interview Question

In coding they have asked about 1. Inverted pyramid 2 . Looping