Skip to content

teochewthunder/qbasic-bubble-sort

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

QBasic Bubble Sort

This is a really basic graphical animation based on the Bubble Sort.

  1. When the program starts, it asks the user for the number of numbers required.
  2. Then it accepts input of numbers x number of times until it has the full list.
  3. Then it begins to sort the list using the Bubble Sort.
  • It starts from the first number in the list, comparing it to the next number in line.
  • If the first number is greater than the next number, it swaps them. If not, it moves on to the next number and compares it to the next number after it, and so on.
  • As the checking progresses down the list until it reaches the end, this is known as a pass. the total number of swaps for that pass is recorded.
  • At the end of the pass, if the number of swaps is more than 0, the process begins all over again.
  • If the number of swaps is 0, the list is sorted.
  1. When all is sorted, it displays the sorted list along with other data such as the number of swaps and how many passes it took.

About

Animated QBasic Bubble Sort Sequence, with user input

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published