Skip to content

Instantly share code, notes, and snippets.

@Dakasha26
Dakasha26 / CocktailSort.java
Last active June 29, 2021 13:02
Algorithms. Daniil Skvortsov. 2 variants of the solution
package program;
public class CocktailSort {
public static void cocktailSort(int[] array) {
int temp;
int left = 0;
int right = array.length - 1;
do {
for(int i = left; i < right; i++) {