Sorts the elements of the list.
Sorts the elements of the list.A specific compare function can be used for the sort.
If NULL is specific as specific compare function, the compare function set for the list will be used if any, otherwise the default compare function is used.
The default compare function compares the two pointers directly.
The compare function specified should behave like the one that can be specified for the C-library function 'qsort'.
This method uses the C library function 'qsort', therefore it normally has a time complexity of O( N * Log(N) ), with N being he size of the list to sort.
For linked lists this method has a memory complexity of O(N). For array lists this method does not need memory.