ScratchData LogoScratchData
Back to DatCatJR's profile

Bubble Sorting Algorithm

DADatCatJR•Created February 15, 2023
Bubble Sorting Algorithm
5
1
98 views
View on Scratch

Instructions

!! FLASHING WARNING !! If you are susceptible to reactions due to flashing lights, please set the display update frequency to Low. TURBO MODE REQUIRED! (If you have the extension that shall not be named, enable 60fps as well. Not required, but enhances the viewing experience.) The long-awaited sequel to my Selection Sorting Algorithm project, this time much easier to use with an upgraded GUI and such. First, set the number of items to sort by clicking "Set" on the home screen, then typing a value. You can also select whether the sound is on, and the frequency at which the display changes to reflect changes in the list of items. By default, these values are set to Off and Medium respectively. Once the settings are all set, click "Sort" and be prepared to wait if your list size is high. If you press "Back" while your list is still sorting, it WILL break and you will have to press the green flag.

Description

Bubble Sort works by going through the entire list, swapping two items if the first one is larger than the second one, and repeating for the length of the list. I added a "completeness" variable that constantly checks if sorting is complete, and cancels all remaining repetitions if so.

Project Details

Project ID804618927
CreatedFebruary 15, 2023
Last ModifiedFebruary 16, 2023
SharedFebruary 16, 2023
Visibilityvisible
CommentsAllowed