fubarx@lemmy.world to Programmer Humor@programming.dev · 2 months agoAI Bubblesortlemmy.worldimagemessage-square39linkfedilinkarrow-up1331arrow-down138
arrow-up1293arrow-down1imageAI Bubblesortlemmy.worldfubarx@lemmy.world to Programmer Humor@programming.dev · 2 months agomessage-square39linkfedilink
minus-squareJohnnyCanuck@lemmy.calinkfedilinkarrow-up10·2 months ago1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 2, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 3, 30…
minus-squareominous ocelot@leminal.spacelinkfedilinkarrow-up2·edit-22 months agoHuh. 101. Maybe the comparable.is_greater_than(int) function needs some work. Or someone compared strings. :)
minus-squareJohnnyCanuck@lemmy.calinkfedilinkarrow-up2·2 months ago Or someone compared strings. Yes, that’s my joke. Using digits in a string list isn’t enough, you have to be smart with your sorting and sort the numbers before you make the string list for your drop down.
Should have been digits
1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 2, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 3, 30…
Huh. 101.
Maybe the comparable.is_greater_than(int) function needs some work. Or someone compared strings. :)
Yes, that’s my joke. Using digits in a string list isn’t enough, you have to be smart with your sorting and sort the numbers before you make the string list for your drop down.