RECURSION Dictionary order (SMALLER & LARGER)

i am getting the correct result but not in the manner in which you guys have shown. what should i do?

Rahul, in your code, you can use a comparator function which will take two strings a and b and then check which is bigger or smaller from them as
bool myCompare(string a,string b)
{
if(a<b)
{
return true;
}
return false;
}