cocktail sort also known as bidirectional bubble sort or cocktail shaker is a varation of bubble sort