sorting - Bubble sort and selection sort -
i know key differences between these 2 sorting methods because similar , have got me confused.
for example, if had sorted array:
x = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] what differences in number of comparisons , movements between using selection , bubble sort on sorted list.
take @ this, visual , audio representation of behavior of different sorting algorithms. entertaining , educational give idea how behave.
http://www.youtube.com/watch?v=t8g-iyghpea
since list provided sorted dealing best case scenario both algorthms, o(n) bubble , o(n^2) selection sort.
Comments
Post a Comment