Sorts arrar a [ 0. . n - 1 ] using Cocktail sort
public class CocktailSort { void cocktailSort ( int a [ ] ) { boolean swapped = true ; int start = 0 ; int end = a . length ; while ( swapped == true ) {