Skip to content

Instantly share code, notes, and snippets.

View marcelmcz's full-sized avatar
🏠
Working from home

Marcel Pires marcelmcz

🏠
Working from home
  • Québec, Canada
View GitHub Profile
private static void fiveToTheEnd(int[] array) {
pointer1:
for(int i=array.length-1; i>0; i--){
if(array[i] != 5) {
for(int o=i-1; o>=0; o--){
if(array[o] == 5){
int temp = array[i];
array[i] = array[o];
array[o] = temp;