Hi everyone,
I'm dealing with a linked list that is supposed to be sorted. It's consisted of a series of strings which each of these strings are associated with 4 more strings. So, I'm looking for a way to sort this linked list with optimum way possible. I have some ideas myself:
1- Make 5 big array and copy everything into it.
Then sort the first string and make any change that is done to first to the rest of arrays.
2- Do the same algorithm using vectors.
3- Or do the same thing using linked list.
Let's say it's something like this, please bare in mind the numbers are in string format:
3 Tom Hanks 52 male actor
1 Sean Penn 50 male actor
2 Clive Owen 44 male actor
after sorting
1 Sean Penn 50 male actor
2 Clive Owen 44 male actor
3 Tom Hanks 52 male actor
Please let me know what could be the easiest and best way to do it.