Pregunta de entrevista de KPMG

They asked me pattern question. To print some inverted pyramid pattern, and then to apply any sorting algorithm.