Added the cocktail sort algorithm