How to sort a list in Scratch! [2.5 ways]

preview_player
Показать описание
How do you sort a list in Scratch? There's no sort list block in Scratch, so you'll have to make the block manually. Thankfully, we'll go through three different ways (bubble sort, improved bubble sort, and merge sort) to sort your list in Scratch, depending on the speed and complexity you need.

Licensed under Creative Commons: By Attribution 4.0 License

#scratch3 #scratch #coding
Рекомендации по теме
Комментарии
Автор

There is a 🪳 in the mergesort code for example [1, 1, 1, 1, 1, 2, 2, 3, 3, 3]. Also, why not drop the else and move the last statement below the if?

J_i_m_
Автор

Thank you so much! This was very helpful because I couldn't figure out how to implement merge sorting into Scratch. This helped me with a big project I'm working on

Goofynaas