4 ms·
Bubble sort :)
by alextgordon 16y ago
Bubble sort :)
- pcestrada 16y agoFrom wikipedia: In computer graphics it [bubblesort] is popular for its capability to detect a very small error (like swap of just two elements) in almost sorted array and fix it in with just linear complexity (2n)
- enneff 16y agoOne possible use of this is sorting objects in a scene by depth. If you do one pass of bubble sort per frame typically this is 'good enough' for most applications.