Skip to content

Instantly share code, notes, and snippets.

### Keybase proof
I hereby claim:
* I am yuri-adeodato on github.
* I am yuriadeodato (https://keybase.io/yuriadeodato) on keybase.
* I have a public key ASA5pYSpACyZceXCZF5DiYX0Q69yyCjJJB5kqaU_GIClEgo
To claim this, I am signing this object:
@yuri-adeodato
yuri-adeodato / BubbleSort.java
Last active July 26, 2018 13:37 — forked from m-x-k/BubbleSort.java
Java 8 bubble sort integer array example using predicates for acending and descending options
import java.util.Arrays;
import java.util.Random;
import java.util.function.Predicate;
public class BubbleSort {
private int[] sort(int[] array, Predicate<Integer> sortType) {
boolean sorted = false;
int temp;
while (!sorted) {