IBM interview question

Bubble sort, complexity, string manipulation