BetterCloud interview question

pyramid algorithm and justify. Java technical qus