Java Bubble Sort
DigitalRipple (30)

It took me a while but I finally got the hang of it. Comment for ideas!

You are viewing a single comment. View All
AdCharity (1112)

javascript be like

let numbers = [1, 5, 3, 100, 27, 368];
numbers.sort(function(x, y){return x - y});
Andi_Chin (142)

@AdCharity javascript also be like: "1,6"==[1,6]

Andi_Chin (142)

java script also be like:
let numbers = [1, 5, 3, 100, 27, 368};
numbers.sort() --- oh wait I'm not gonna sort these numbers by their numerical value, lemme force them into strings and sort by the first digit xD get trolled xD lolol

DigitalRipple (30)

@Andi_Chin That's what bubble sort is tho...

AdCharity (1112)

@Andi_Chin huh? js is good that way - for instance, I couldn't do "string " + 5 in other languages and expect a valid return.

Andi_Chin (142)

@AdCharity of course, that's just great because it's exactly what comes to my mind when I think of sorting NUMBERS. Plus I really really like programs that run without errors and instead exhibit unexpected behaviors.

AdCharity (1112)

@Andi_Chin :/ what ever floats your boat