I have a text file full of words. I need to go through the text file and count the number of words that are spelled in alphabetical order. I am struggling to think of way to figure out if a word is in alphabetical order.
I have already looked around and have seen that it can be done with sorted. However, we haven't yet learned about sort in class so I can't use it. Help/tips much appreciated.
Do I need to do something like assigning each letter of the alphabet a number?