SORT THE STRINGS help

question = https://hack.codingblocks.com/contests/c/452/1121
solution = https://ide.codingblocks.com/#/s/22658