Ok, it's a little weird, but I'm basically trying to write a piece of code that would determine how many letters are different between two words, like cat and cot are off by one yet cat and dog are off by three.
So, I have a vector that contains all the three letter words I'm suppose to use, plus the word I'm suppose to compare them too. So, I made a new vector that using a struct that contains the string and the integer that stores the difference between the two of them words.
Is there a way I could sort that vector by the integer difference? If not, is there a way I could use the integer difference to go through the list and put the words in the right order?
I mean, there's obviously the option of going through the list multiple times until it's done. I was just curious is there was an easier way to do this.