i have 100 records which need to be sorted by the customers first name. i am able to write bubble sorts for integers but not for strings.
i can't get my head around converting a string to an int.
for example the names may be stored in a text file like this
and the desired output is
now as i said, i can do a bubble sort with numbers so if i could for example, convert
Chandler to 3, 8, 1, 14, 4, 12, 5, 18 (thats changing each letter to its corresponding number) i could sort it, but i can't figure out how to do that. alternitivly there could be another way of sorting these directly, but i cannot find the answer anywhere.
it must be bubble sort as its for an assignment.
thank you very much for your time.