โœ๏ธ

Bubble sort

Hard๐Ÿท๏ธ Sorting๐Ÿ“‚ Algorithmic Thinking
๐Ÿงฉ The problem

Sort SET NUMS = [5, 1, 4, 2, 8] into ascending order using bubble sort (don’t use SORT!), then DISPLAY NUMS.

Examples

  • Output: [1, 2, 4, 5, 8]

โœ๏ธ Write your pseudocode

Press Run to watch it step by step, and Run tests to check it against every test case.

โ† All practice problems