Pergunta de entrevista da empresa American Express

Sort a string alphabetically. Print a number pyramid pattern.