American Express interview question

Sort a string alphabetically. Print a number pyramid pattern.