Sort the strings interview problem

hello guys.I am new to here.
i was solving a problems of 10 days of code.And stuck at problem of sorting the strings
I followed the instructor carefully and copy the code exactly.Even after that i dint get the output.I tried hours finding the bug.But cant find it.I really i appreciate if someone helps me.See the code here