State Street interview question

Write a array code to arrange the strings .