Updated bubble_sort to use function pointer to compare algorithm.