Thursday, March 26, 2009

Bubble

Today we talked about the bubble sort. The bubble sort is when you have a mixed up numbers or letters that are mixed up in any order. Using the bubble sort it puts the numbers or letters in the correct order either from largest to smallest or smallest to greatest. It keeps going through a for loop until it has been sorted into the right. The bubble sort doesn't know how to stop unless you add a flag to it. There is multiple ways to do the bubble sort. If you have 3 or less you can do arrays which have a bunch of if statements. This takes longer to do. Than there's the bubble sort which takes less lines and is quicker. Today we also got our quiz review for Monday. Mr.Charelli showed us what we need to do to get the marks we need for the test.

No comments: