ScratchSort

Install Java to view this project right on your browser!

user_icon Jens shared it 3 years, 5 months ago
390 views, 1 tagger, 8 people love it, 2 remixes by 2 people, 90 downloads, in 1 gallery
Add to my favorites?
Flag as inappropriate?

Comments

You need to be logged in to post comments

Add a Comment

 
KrIsMa KrIsMa 2 months, 2 weeks ago

whats the difference between scratch and thread? i dont get it.

bgsteve bgsteve 1 year, 3 months ago

what scirpts was you using

lihkan lihkan 1 year, 6 months ago

ScratchSort is faster!

DarthPickley DarthPickley 2 years ago

check it out! (link to project)

DarthPickley DarthPickley 2 years ago

I'm trying to convert this into a string-number sorting algorithm. due to what I consider a bug in the comparing of a numerical value and a string value that causes all comparisons to evaluate to false, I had to add a $ at the beginning of all compared values so that numbers are evaluated as strings. Now I want to know whether there might be a case where there would be numbers and strings being sorted, and the person wanted numbers sorted by value and strings sorted alphabetically...

DarthPickley DarthPickley 2 years ago

how could you modify these so that they would work with strings? you would have to remove any numerical functions (like the code for finding the average) but will it still work if there is no average?

Jens Jens 2 years ago

Hmmm, I'm not sure how to convert this to Strings, since Scratch cannot get a character's ascii value... but wait! you could create a look-up list with the ascii value of the most common characters. Yeah, that might work :-)

(view all replies)
hidas hidas 2 years, 3 months ago

pretty awesome! :)

scratchycat625625 scratchycat62… 2 years, 5 months ago

put it on turbo speed: it would do it in seconds(which it already does)!

AGXgames AGXgames 2 years, 6 months ago

Excuse me, paddle2see told me that you know how to hack scratch. Can you please tell me how?

Jens Jens 2 years, 6 months ago

Why don't you just use the published source code? Scratch is not really locked down, so if you find a bug you'll be able to break into your Scratch image and modify it. However, this won't be fun because the sources you'll see will be incomplete (without comments and full variable names). So, since Scratch now is officially open source I'd go with the full code version :-)

(view all replies)
Nintendofan Nintendofan 2 years, 11 months ago

komisch, bei ScratchSort ist die liste hinterher gar nicht sortiert. ist das absicht?

Jens Jens 2 years, 11 months ago

natürlich nicht ;-) ist aber ein Fehler im Java-Player, wenn Du das project in Scratch laufen lässt, funktioniert es richtig (das ist übrigens - leider - bei vielen Projekten mit Listen der Fall)

kiwi13 kiwi13 3 years, 1 month ago

Whoa! This is much faster than mine. (link to project)

DaCaMa DaCaMa 3 years, 4 months ago

ohh

inuwali inuwali 3 years, 4 months ago

Very cool! Thanks for your comment, by the way, about Repeat After Me... I have been MIA for a few months in the startup of school. I'll friend you on Facebook, promise. Have you considered Radix Sort? It's supposed to be very efficient for numbers since it only has to do n*log(m) passes, where m is the maximum of the number of digits in the numbers. Unless the numbers are quite long or the list is quite short, you should see an improvement over n*log(n) sorting that you get with Insertion Sort

Jens Jens 3 years, 4 months ago

Thanks! I'm just now pretty occupied with other stuff than another sorting project, why don't you give radix sort a try, sounds like there could be some improvement there over my insertion sort variants.

JD_Wardrop JD_Wardrop 3 years, 5 months ago

sorry about the forums problem

gadgetman gadgetman 3 years, 5 months ago

(link to project) what do you think is this faster i added 2 more to my other version and it goes fast!

Cyclone103 Cyclone103 3 years, 5 months ago

Wow, much faster than the other one, and the algorithm is simpler too! Amazing! I am surprised to find, however, that in presentation mode, it actually runs slower than in edit mode, and edit mode runs slower than online. I guess online wins! Great project, loved & faved!

Jens Jens 3 years, 5 months ago

I am surprised, too, that presentation mode runs a *lot* slower with list watchers than development mode, because usually it's the other way round.

Paddle2See Paddle2See* 3 years, 5 months ago

Very nice! That's pretty fast!

Jens Jens 3 years, 5 months ago

It's an interesting algorithm I came up with while riding my bycicle to work the other day, gotta find out if somebody already published/named it before, lol!

chalkmarrow chalkmarrow 3 years, 5 months ago

Nice. That's getting to the speed that it could actually be useful in realtime.

Please Wait...