I have a list of strings that contains words like: Amount, bird, ant, Bob, David, case... I need to sort them in dictionary order (Amount, ant, bird, Bob, case, David...)
I use the insertion sort which turned out the output to be all capital letters in front and then lower case strings (Amount, Bob, David, ant, bird, case...).
my question is what would be a better way to sort those words into the dictionary order? Do I have to change each single word to lower case then compare? or we have some better way to compare it?